主题: [MATLAB数学相关] 急求:subs 命令的应用
查看单个帖子
旧 2011-01-15, 16:47   #1
xiaoyezi868
初级会员
 
注册日期: 2010-11-16
帖子: 8
声望力: 0
xiaoyezi868 正向着好的方向发展
问题 求助:subs 命令的应用

HELP 中有介绍:“subs(S,old,new),If old and new are cell arrays of the same size, each element of old is replaced by the corresponding element of new.”但是当old 和new 中有向量时总是出现错误,求求那位智者能给予解答!!!

syms t
t0=1/3*pi;
y=[2;2;2];
y0=[1;0;0];
S=sin(t)*y;
subs(S,{t,y},{t0,y0})

ans =

3^(1/2)
3^(1/2)
3^(1/2)

答案应该是
3^(1/2)/2
0
0

此帖于 2011-01-15 19:56 被 xiaoyezi868 编辑。
xiaoyezi868 当前离线   回复时引用此帖