1 第一,启动MATLAB,新建脚本(Ctrl+N),输入如下代码:close all;clear all;clcx=0:pi/50:2*pi;y=sin(x);hline1=plot(x,y,'k','linewidth',3);hline2=line(x+0.05,y,'linewidth',4,'color',[.8,.8,.8]);set(gca,'children',[...
两个函数的格式不同:\x0d\x0aplot(X,Y,S); % X,Y为坐标,画出一个点,S为其它属性(颜色,点的大小等)。\x0d\x0aline([X1 X2],[Y1 Y2],S); %点A(X1,Y1)和点B(X2 Y2)之间画一条直线,S为其它属性(颜色,线的粗细等)。\x0d\x0a详细资料可以在matlab主面板里输入 ...
MATLAB MATLAB Plot 在MATLAB 中使用不同的线型使一个图与另一个图不同 在MATLAB 中使用不同的线标记使一个图与另一个图不同 在MATLAB 中使用不同的线条颜色使一个图与另一个图不同 本教程将讨论如何使用 MATLAB 中的线条样式,标记和颜色来使一个 plot 与另一个有所不同。 在MATLAB 中使用不同的...
具有常量 y 值的水平线 - MATLAB yline - MathWorks 中国 分子图 subplot h1 = figure(1); set(h1,'pos',[200 200 1200 350]); box off; subplot(131) p11 = plot(Time1,GRF_FL_1,'c-','LineWidth',1); hold on; p12 = plot(Time1,GRF_FR_1,'b--','LineWidth',1); p13 = plot(...
最后一句画图有问题,请修改为 plot(xi,y0,'o',xi,y1,xi,y2,'-');或者以点表示修改为plot(xi,y0,'o',xi,y1,xi,y2,'-.');效果看截图
matlab文档中提供了所有的样式颜色符号表,help plot 可以查看参考页的input Arguments(输入参数)中的LineSpec,可以查看line-style、marker、color的所有参数 。 1 2 3 4 5 6 7 8 9 x=0:0.1:2*3.14 ; y=sin(x); plot(x,y,'-.or');% 三个属性都放在一起,没有前后顺序,放在单引号中 ...
2-D line plot Syntax plot(Y) plot(X1,Y1,...,Xn,Yn) plot(X1,Y1,LineSpec,...,Xn,Yn,LineSpec) plot(...,'PropertyName',PropertyValue,...) plot(axes_handle,...) h = plot(...) 1、设置坐标字体(A) set(gca,'FontSize',12); ...
你52行和35行画的图一样,中间指令没看到对f和y_zp的改变啊,52行plot后直接按照35行改就行了啊 plot(f,abs(y_zp(1:n/2)))
Create 2-D Line Plot MATLABPlot Gallery How useful was this information? Unrated1 star2 stars3 stars4 stars5 stars Select a Web Site Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:United Stat...
. That should give you the plot you want.If