作业帮 > 综合 > 作业

matlab总是显示Vectors must be the same lengths,请大师帮忙,

来源:学生作业帮 编辑:神马作文网作业帮 分类:综合作业 时间:2024/11/12 00:33:19
matlab总是显示Vectors must be the same lengths,请大师帮忙,
我记录了一组数据,想画数据图,但是总是运行不了,程序如下:
>> x=0.4:0.5:0.6:0.7:0.8:0.9:1:1.1:1.2:1.3:1.4:1.5:1.6:1.7:1.8:1.9:2:2.1:2.2:2.3:2.4:2.5:2.6:2.7:2.8:2.9:3:3.1:3.2:3.3:3.4:3.5:3.6:3.7:3.8:3.9;
>> y1=200:200:170:155:152:170:175:195:200:200:195:188:182:165:152:140:135:130:123:118:117:110:110:109:110:110:110:110:115:110:120:120:130:150:155:150;
>> y2=200:200:200:200:203:205:206:205:205:203:203:203:205:203:203:203:201:202:205:203:201:201:203:202:205:205:208:205:205:205:205:205:204:203:204:208;
>> plot(x,y1,x,y2)
Error using ==> plot
Vectors must be the same lengths.
我没有财富值了,请大师帮个忙
matlab总是显示Vectors must be the same lengths,请大师帮忙,
数字之间不用: 连接
用逗号或者空格再用[]括起来
例如
x=[0.4,0.5,0.6,0.7];