matlab中subs函数引用疑问

matlab中subs函数引用疑问

%%%%%%%%%%%%%%%%%%%%%
syms t y x w k d n c a b;
f=ax^n+by+k;
r=sin(t);y=log(w);u=cexp(-bt);
f=subs(f,{a b k},{r y u})%花括号与中括号都可以

j=subs(n,5)
l=subs(k,pi)
z=subs(k,1:4)
%%%%%%%%%%%%%%%%%%%
结果
%%%%%%%%%%%%%%%%
f =

cexp(-bt) + x^nsin(t) + ylog(w)

j =

5

l =

pi

z =

[ 1, 2, 3, 4]


%%%%%%%%%%%%%%%%%%
syms m Dv dv lv;
pv=(4m/(pi(Dv2-dv2)lv));
% ev=sqrt()
m1=23.53;
L=[25.22,25.28,25.26,25.24,25.26,25.28,25.24,25.26];
D=[23.84,23.86,23.88,23.88,23.86,23.88,23.86,23.89];
d=[12.08,12.11,12.06,12.12,12.08,12.09,12.09,12.08];
%L=input(‘输入数据格式[]:’);
% (p,q)=size(L);
nlv=L/8;
nDv=D/8;
ndv=d/8;%求平均值
ls=sqrt((1/7)
((L-lv)2));
Ds=sqrt((1/7)
((D-Dv)2));
ds=sqrt((1/7)
((d-dv)*2));%平均标准偏差
subs(pv,{m Dv dv lv},{m1,nDv,ndv,nlv})
%%%%%%%%%%%%%%%%%%%%%%%%%%
结果
ans =

[ 28960000/(6402291pi), 60236800/(13355661pi), 6023680000/(1341340101pi), 3764800/(834813pi), 6023680000/(1336800879pi), 1505920000/(335028177pi), 2409472000/(533991953pi), 24094720000/(5365295991pi)]
%%%%%%%%%%%%%%%%%%%%%%%%%%%
两者都是subs替换字符,前者引用[],后者引用{};ps:(第二个若引用[]会报错)

求大佬解答

你可能感兴趣的:(matlab中subs函数引用疑问)