- 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
조회 수: 35 (최근 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!