Numerical results for symbolic expressions could not be obtained
1 回表示 (過去 30 日間)
古いコメントを表示
syms z T t s;
cz = (1-exp(-10*T)*z^(-1))/((2-exp(-10*T)*z^(-1))*(1-z^(-1)))
cs = subs(cz, z,exp(s*T))
ct = ilaplace(subs(cs,T,0.07),s,t)
y = eval(subs(ct,t,0.1))
stem(0.1,eval(y))
while I got
Unable to convert expression containing remaining symbolic function calls into double array. Argument must be expression that evaluates to number.
Any help would be appreciated!
1 件のコメント
Dyuman Joshi
2023 年 11 月 16 日
編集済み: Dyuman Joshi
2023 年 11 月 16 日
Firstly, do not use eval(). It is strongly recommended to not use it nor is it required here.
Secondly, "y" is a symbolic expression, how do you plan to plot a stem plot using it? As a stem() requires numerical data to plot.
What are you trying to do? What is the objective here?
syms z T t s;
cz = (1-exp(-10*T)*z^(-1))/((2-exp(-10*T)*z^(-1))*(1-z^(-1)));
cs = subs(cz, z,exp(s*T));
ct = ilaplace(subs(cs,T,0.07),s,t);
y = subs(ct,t,0.1)
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!