[繪圖] Error using ==> plus已回收
>> x=linspace(0,90,60);
e=1/1.5
c=asin(e*sin(x))
b=2*1*cos(x)/(1*cos(x)+1.5*cos(a))
y=[1.5*cos(c)]*b^2; z=cos(x);
plot(x,y,x,z) % 將 y=sin(x) 及 z=cos(x) 二函數分佈繪圖
plot(x,y,'g:',x,z,'r--') % 加上不同的顏色及符號來區別二條曲線
--------------
執行後
e =
0.6667
c =
Columns 1 through 8
0 0.7288 0.0605 -0.7215 -0.1206 0.7070 0.1802
-0.6858
Columns 9 through 16
-0.2390 0.6584 0.2965 -0.6253 -0.3526 0.5872 0.4067
-0.5447
Columns 17 through 24
-0.4585 0.4984 0.5074 -0.4488 -0.5531 0.3966 0.5948
-0.3421
Columns 25 through 32
-0.6320 0.2857 0.6641 -0.2279 -0.6904 0.1690 0.7103
-0.1092
Columns 33 through 40
-0.7234 0.0490 0.7294 0.0115 -0.7280 -0.0719 0.7193
0.1320
Columns 41 through 48
-0.7035 -0.1915 0.6811 0.2500 -0.6525 -0.3073 0.6184
0.3630
Columns 49 through 56
-0.5794 -0.4167 0.5361 0.4680 -0.4892 -0.5164 0.4391
0.5613
Columns 57 through 60
-0.3864 -0.6022 0.3315 0.6385
顯示錯誤:
??? Error using ==> plus
Matrix dimensions must agree.
似乎第一行只能用x=linspace(0,90,30);
而不能用0,90,60<<或其他數字
如何更正呢?
感謝
--
可以跟我做朋友嗎 (扭)
我很善良的^Q^~"
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 118.170.125.172
※ 編輯: sssstt 來自: 118.170.125.172 (11/13 15:58)
→
11/13 16:08, , 1F
11/13 16:08, 1F
→
11/13 16:15, , 2F
11/13 16:15, 2F