matlab报错?Error using ==> mpower Inputs must be a scalar and a square matrix.t=0:pi/100:2*pi;theta_1=2*pi*t;b_c=sqrt(180^2+100^2-2*180*100*cos(2*pi-theta_1));theta_4=acos((80-100*(180^2+b_c^2-100^2)/(360*b_c))/100);soe=100*sin(atan(100*sin(theta_1
来源:学生作业帮助网 编辑:作业帮 时间:2024/11/27 13:42:25
matlab报错?Error using ==> mpower Inputs must be a scalar and a square matrix.t=0:pi/100:2*pi;theta_1=2*pi*t;b_c=sqrt(180^2+100^2-2*180*100*cos(2*pi-theta_1));theta_4=acos((80-100*(180^2+b_c^2-100^2)/(360*b_c))/100);soe=100*sin(atan(100*sin(theta_1
matlab报错?Error using ==> mpower Inputs must be a scalar and a square matrix.
t=0:pi/100:2*pi;
theta_1=2*pi*t;
b_c=sqrt(180^2+100^2-2*180*100*cos(2*pi-theta_1));
theta_4=acos((80-100*(180^2+b_c^2-100^2)/(360*b_c))/100);
soe=100*sin(atan(100*sin(theta_1)/(180+100*cos(theta_1))))+100*sin(theta_4);
plot(t,soe);
Error using ==> mpower
Inputs must be a scalar and a square matrix.
这个程序就一个自变量t
matlab报错?Error using ==> mpower Inputs must be a scalar and a square matrix.t=0:pi/100:2*pi;theta_1=2*pi*t;b_c=sqrt(180^2+100^2-2*180*100*cos(2*pi-theta_1));theta_4=acos((80-100*(180^2+b_c^2-100^2)/(360*b_c))/100);soe=100*sin(atan(100*sin(theta_1
theta_4=acos((80-100*(180^2+b_c^2-100^2)/(360*b_c))/100);
|
theta_4=acos((80-100*(180^2+b_c.^2-100^2)/(360*b_c))/100);
直接乘方是矩阵的乘方,只能用于标量和方阵
要求向量对应位置元素的平方要用.^
除法也要用./
soe=100*sin(atan(100*sin(theta_1)/(180+100*cos(theta_1))))+100*sin(theta_4);
|
soe=100*sin(atan(100*sin(theta_1)./(180+100*cos(theta_1))))+100*sin(theta_4);