[其他]問題 script

作者: dreler1 (....)   2014-06-14 06:28:11
我模仿教科書的寫法
% Script file: rad _ deg
x = 0:0.314:2*pi; % creates the row vector x
y1 = sin(x); % creates the row vector sin(x)
y2 = cos(x); % creates the row vector cos(x)
z = x*180/pi; % converts radians to degrees
disp('****************************')
disp('x( deg) x (rad) sin(x) cos(x)')
disp('****************************')
[z' x' y1' y2] % displays in table format
disp('****************************')
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in rad_deg (line 9)
[z' x' y1' y2] % displays in table format
google了一下午 找不到原因
謝謝
作者: jatj   2014-06-14 07:43:00
[z' x' y1' y2] 改成 [z' x' y1' y2']
作者: dreler1 (....)   2014-06-14 10:40:00
thanks

Links booklink

Contact Us: admin [ a t ] ucptt.com