subs & solve出错
刚刚学matlab没多久,实在头疼……R=[];
i=1;
for theta=0:pi/60:2*pi
R(i)=subs(solve('4*(r-3^2/r)*sin(theta)+256/(2*pi)*log(r/3)-3=0'));
i=i+1;
end;
运行就会有如下提示:
??? Conversion to double from sym is not possible.
[ 本帖最后由 ChaChing 于 2009-4-8 07:39 编辑 ] 怎麽我的错误讯息又跟楼主的不同!? R2006a
??? Input argument "NEWexpr" is undefined.
Error in ==> sym.subs at 104
msg = inputchk(OLDf,OLDexpr,NEWexpr); 数据类型不对
回复 板凳 娜娜张 的帖子
呃~~我也猜到了,不过就是不知道怎么改~~~回复 地板 4a_while 的帖子
syms r thetappp=0:pi/60:2*pi; R=zeros(size(ppp));
for i=1:length(ppp)
thetap=pi/60*(i-1);
R(i)=solve(subs('4*(r-3^2/r)*sin(theta)+256/(2*pi)*log(r/3)-3=0','theta',thetap),'r');
end;
plot(R)
页:
[1]