Numerical results for symbolic expressions could not be obtained

1 visualización (últimos 30 días)
L siky
L siky el 16 de Nov. de 2023
Editada: Dyuman Joshi el 16 de Nov. de 2023
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 comentario
Dyuman Joshi
Dyuman Joshi el 16 de Nov. de 2023
Editada: Dyuman Joshi el 16 de Nov. de 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)
y = 

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by