Numerical results for symbolic expressions could not be obtained
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Dyuman Joshi
le 16 Nov 2023
Modifié(e) : Dyuman Joshi
le 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)
Réponses (0)
Voir également
Catégories
En savoir plus sur Assumptions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!