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/12/20 02:51:51
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);