Numerical results for symbolic expressions could not be obtained
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Dyuman Joshi
am 16 Nov. 2023
Bearbeitet: Dyuman Joshi
am 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)
Antworten (0)
Siehe auch
Kategorien
Mehr zu Assumptions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!