在MATLAB2011b中运行x=0:0.001:2*pi; y=sin(0.5*sin(x)); polar(x,y);报错

Error in polar
hhh=line([-maxrho,-maxrho,maxrho,maxrho],[-maxrho,maxrho,maxrho,-maxrho],'parent',cax)
求解答啊!

第1个回答  2013-07-24
是不是运行结果总是"0"?如果是这样rvz那么式子没错不过你使用的tao(音译)值太小如果x不够小,则指数运算后近似为零这是我的测试结果:>> x=0.001;>> y=2*exp(-x*0.001^-1)*sin(2*pi*666*x+pi)y =    0.6356>> x=0.1;>> y=2*exp(-x*0.001^-1)*sin(2*pi*666*x+pi)y =  4.3732e-044>> x=1;>> y=2*exp(-x*0.001^-1)*sin(2*pi*666*x+pi)y =     0由上面可以看出x取值在0.1数量级以下才能出非零结果1
相似回答
大家正在搜