如何用matlab画出反正切函数的曲线
请各位大神指点呀:symsuc=0.2;u=1;
x=0:0.01:5;
y=arctan((2*c)/(4*u*(c^2)*x.^2-2*c-x.^2+2*c*x.^2));
axis();
plot(x,y,'b');
xlabel('固有频率比');
ylabel('相位角');
axis();
legend('u=3');
set(gca,'Fontsize',12)
legend('u=1','u=2','u=3','u=4');
这个程序错在哪了?总是提示说y=arctan((2*c)/(4*u*(c^2)*x.^2-2*c-x.^2+2*c*x.^2));出错
clc;clear;
c=0.2;
x=0:0.01:5;
for u=1:4
a=(4*u*(c^2)*x.^2-2*c-x.^2+2*c*x.^2);
b=2*c;
z=a+i*b;
y=unwrap(angle(z));
plot(x,y,'color',);
hold on
end
legend('u=1','u=2','u=3','u=4','location','northeastoutside');
axis tight
xlabel('固有频率比');
ylabel('相位角');
颜色区分度不是很好,另外求相位角一般涉及到相位解缠,用atan不是很理想
页:
[1]