Numerical results for symbolic expressions could not be obtained
1 view (last 30 days)
Show older comments
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 Comment
Dyuman Joshi
on 16 Nov 2023
Edited: Dyuman Joshi
on 16 Nov 2023
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)
Answers (0)
See Also
Categories
Find more on Assumptions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!