- http://www.mathworks.com/help/symbolic/ilaplace.html
- http://www.mathworks.com/help/control/ref/tfdata.html
How can I convert a transfer function into time dependent using ilaplace
39 ビュー (過去 30 日間)
古いコメントを表示
I have tried to use ilaplace
X2=(F*G3+C*G3)/(1+C*G3); % F,G3,C are transfer functions generated using tf
v=sym('X2');
x=ilaplace(v);
then i use it to plot a function using plot but when i try to run the code i get an error as shown below
??? The following error occurred converting from sym to double: Error using ==> mupadmex Error in MuPAD command: DOUBLE cannot convert the input expression into a double array.
0 件のコメント
回答 (1 件)
Jonathan LeSage
2013 年 10 月 17 日
The ilaplace function works on symbolic expressions and not transfer function models. You need to convert the transfer function, X2, into a symbolic expression prior to using the ilaplace function.
Here are some links to some relevant functions:
To get you started, here is some example code of one potential method of conversion:
% Your transfer function model
X2 = (F*G3+C*G3)/(1+C*G3);
% Extract the numerator/denominator
[num,den] = tfdata(X2);
% Build symbolic expression using the numerator/denominator
syms s
arrayNum = cell2mat(num);
arrayDen = cell2mat(den);
X2_symbolic = poly2sym(arrayNum,s)/poly2sym(arrayDen,s);
% Valid usage of ilaplace on a symbolic
x = ilaplace(X2_symbolic);
参考
カテゴリ
Help Center および File Exchange で Calculus についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!