clc
clear
t=0:1:30
y=-5*sin(2*t)*2^(1/2)+5*3^(1/2)*cos(2*t)*2^(1/2)+150*2^(1/2)+2^(1/2)*t+325/3*2^(1/2)*3^(1/2)-1/3*(3900*t*3^(1/2)-58500*cos(2*t)+27000*3^(1/2)*cos(2*t)+1350*cos(2*t)^2+19500*sin(2*t)*3^(1/2)-180*t*sin(2*t)+398550-5400*t+585000*3^(1/2)+2250*sin(2*t)^2-27000*sin(2*t)-18*t^2+900*3^(1/2)*cos(2*t)*sin(2*t)+180*3^(1/2)*cos(2*t)*t)^(1/2);
plot(t,y)
程序如上。只有一个变量。而且表达式是通过MATLAB运算出来的,但是出错信息如下:
??? Error using ==> ^
Matrix must be square.
Error in ==> D:\3_pcr\test1.m
On line 4 ==> y=-5*sin(2*t)*2^(1/2)+5*3^(1/2)*cos(2*t)*2^(1/2)+150*2^(1/2)+2^(1/2)*t+325/3*2^(1/2)*3^(1/2)-1/3*(3900*t*3^(1/2)-58500*cos(2*t)+27000*3^(1/2)*cos(2*t)+1350*cos(2*t)^2+19500*sin(2*t)*3^(1/2)-180*t*sin