Laplace Inverse Transform Error
5 ビュー (過去 30 日間)
古いコメントを表示
In a script I've got this code:
syms s t
X1 = 1/s;
syms K p Kp taud taui
num = (Kp*K*taud)*(s^2 + s/taud + 1/(taud*taui));
den =s^2 *(s+p) + K*Kp*taud * (s^2 + s/taud+ 1/(taud*taui));
H = num/den;
Y1 = H* X1;
yaux=ilaplace(Y1);
y = matlabFunction(yaux);
It returned an error in the last line that I couldn't solve. When I use a H system less complex it works, but with this H the error it returns is the following:
Error using symengine
Code generation failed due to unexpected object of type 'RootOf'.
Error in sym/matlabFunction>mup2mat (line 404)
res = mupadmex('symobj::generateMATLAB',r.s,ano,spa,0);
Error in sym/matlabFunction>mup2matcell (line 374)
r = mup2mat(c{1},true,sparseMat);
Error in sym/matlabFunction (line 188)
body = mup2matcell(funs, opts.Sparse);
Error in Untitled (line 285)
y = matlabFunction(yaux);
Please, Could someone give me a hand?
I used matlabFunction() because I need to plot the y(t) funtion and without using it, it doesn't work.
2 件のコメント
Asvin Kumar
2020 年 4 月 29 日
I am unsure of the exact cause of your error but I might be able to provide an alternate approach. Try using subs to substitute the values of all constants in 'yaux' and then plotting it using fplot, fsurf or other related functions.
採用された回答
その他の回答 (0 件)
参考
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!