【发布时间】:2014-02-10 08:09:30
【问题描述】:
我试图在 MATLAB 中得到这个,但是我没有成功!那里有任何 MATLAB 大师吗?
alt text http://www.freeimagehosting.net/uploads/94020b921d.gif
我想简单的命令应该可以工作,可能不需要程序。
我得到的错误是;
>> t = -pi:0.1:pi;
>> r = ((sin(t)*sqrt(cos(t)))*(sin(t) + (7/5))^(-1)) - 2*sin(t) + 2 ;
??? Error using ==> mtimes
Inner matrix dimensions must agree.
更新
即使这样也没有用!
>> t = -pi:0.1:pi;
>> r = ((sin(t).*sqrt(cos(t))).*(sin(t) + (7/5)).^(-1)) - 2*sin(t) + 2 ;
>> plot(r,t)
??? Error using ==> plot
Vectors must be the same lengths.
【问题讨论】:
-
不应该是
plot(r,t)吗? -
@Andreas Brinck:是的! .....对不起!
标签: matlab