声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2266|回复: 3

[综合讨论] Vectors must be the same lengths?

[复制链接]
发表于 2010-6-11 21:06 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
clear; clf
x=0:13:26:39:52:70:88:106:124:142:160:178:196:214:232:250:268:286:304:322:340:358:376:394:412:430:448:466:484:497:510:523:536;
ysy=9.666:9.614:9.584:9.549:9.513:9.532:9.577:9.606:9.682:9.657:9.579:9.551:9.547:9.583:9.619:9.629:9.627:9.539:9.554:9.56:9.559:9.592:9.607:9.645:9.659:9.63:9.59:9.539:9.538:9.545:9.567:9.586:9.616;
yxy=9.667:9.608:9.564:9.547:9.541:9.538:9.59:9.621:9.662:9.652:9.585:9.551:9.529:9.581:9.603:9.629:9.627:9.54:9.556:9.557:9.552:9.61:9.611:9.629:9.661:9.626:9.578:9.534:9.539:9.537:9.553:9.596:9.611;
plot(x,ysy)
set(gca,'xtick',[0 13 26 39 52 88 124 160 196 232 268 304 340 376 412 448 484 497 510 523 536])
set(gca,'xticklabel',{'0#','1/4','边跨跨中','3/4','1#','1/4','次边跨跨中','3/4','2#','1/4','中跨跨中','3/4','3#','1/4','次边跨跨中','3/4','4#','1/4','边跨跨中','3/4','5#'})

老是显示“Vectors must be the same lengths”,希望大家能帮助我,谢谢!
数据应该怎么输入啊,我是菜鸟

[ 本帖最后由 ChaChing 于 2010-6-12 12:31 编辑 ]
回复
分享到:

使用道具 举报

发表于 2010-6-11 21:24 | 显示全部楼层
你的x,ysy长度不一样,还有,你这个是什么输入数据的方法?怎么ysy yxy都是空的,x只有两个数据
 楼主| 发表于 2010-6-11 21:50 | 显示全部楼层
clear; clf
x=[0,13,26,39,52,70,88,106,124,142,160,178,196,214,232,250,268,286,304,322,340,358,376,394,412,430,448,466,484,497,510,523,536];
ysy=[9.666,9.614,9.584,9.549,9.513,9.532,9.577,9.606,9.682,9.657,9.579,9.551,9.547,9.583,9.619,9.629,9.627,9.539,9.554,9.56,9.559,9.592,9.607,9.645,9.659,9.63,9.59,9.539,9.538,9.545,9.567,9.586,9.616];
yxy=[9.667,9.608,9.564,9.547,9.541,9.538,9.59,9.621,9.662,9.652,9.585,9.551,9.529,9.581,9.603,9.629,9.627,9.54,9.556,9.557,9.552,9.61,9.611,9.629,9.661,9.626,9.578,9.534,9.539,9.537,9.553,9.596,9.611];
plot(x,ysy)
set(gca,'xtick',[0 13 26 39 52 88 124 160 196 232 268 304 340 376 412 448 484 497 510 523 536])
set(gca,'xticklabel',{'0#','1/4','边跨跨中','3/4','1#','1/4','次边跨跨中','3/4','2#','1/4','中跨跨中','3/4','3#','1/4','次边跨跨中','3/4','4#','1/4','边跨跨中','3/4','5#'})

我自己解决了,应该这样输入,谢谢

[ 本帖最后由 ChaChing 于 2010-6-12 12:30 编辑 ]

评分

1

查看全部评分

发表于 2010-6-12 01:08 | 显示全部楼层
有点好奇这些代表什么意思!?:loveliness:
x=0:13:26:39;
x=0:13:26:39:52;
x=0:13:26:39:52:22;
您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-26 01:32 , Processed in 0.071575 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表