
Check for missing argument or incorrect argument data type in call to function 'ilaplace'.
조회 수: 10 (최근 30일)
이전 댓글 표시
syms t s
num = [0 0 1 2 1]
den = [1 2 2 2 0]
sys=tf(num,den)
h=matlabFunction(ilaplace(sys))
t=1:0.01:20
plot(t,h(t))
xlabel('Time [sec]')
ylabel('y(t)')
I am trying to plot the inverse laplace of sys. But I can't solve the error, please help!!
댓글 수: 0
채택된 답변
Ameer Hamza
2020년 9월 13일
tf() is from the control system toolbox, which is not directly compatible with the symbolic toolbox—following shows how to solve it using both approaches.
Using ilaplace (symbolic toolbox)
syms t s
num = [0 0 1 2 1];
den = [1 2 2 2 0];
hs = poly2sym(num, s)/poly2sym(den, s);
ht = ilaplace(hs);
tv = 0:0.01:20;
Hv = subs(ht, t, tv);
plot(tv, Hv);
Using control toolbox
num = [0 0 1 2 1];
den = [1 2 2 2 0];
sys = tf(num, den);
impulse(sys);
Output for both codes

추가 답변 (2개)
vissia volpe
2020년 11월 21일
I run my program, but i have a problem instruction ilaplace .
"Check for missing argument or incorrect argument data type in call to function 'ilaplace'.
Error in s229562_Es1 (line 56)
Y=ilaplace(g)"
the program is:
a=2;
b=2;
c=7;
d=9;
e=6;
f=2;
syms s tau1 tau2 k1 k2
tau= a+b+c+d+e+f
K= a+b+c+d*0.1+e*0.01+f*0.001
k1=1/(1+K*tau)
k2=1/(1+K*tau)
tau1=tau/(1+K*tau)
tau2=tau/(1+K*tau)
num=[k1*k2];
den=[tau1*tau2,tau1+tau2, 1];
disp("QUESTA E' LA FUNZIONE DI TRASFERIMENTO:")
G=tf(num, den)
disp("ZERI DELLA MIA FDT:")
zero(G)
disp("POLI DELLA MIA FDT:")
p=pole (G)
disp("GUADAGNO STATICO DELLA MIA FDT:")
z=dcgain(G)
%PUNTO_3 DISEGNO DEL GRAFICO DELLA RISPOSTA
A=-1; %ampiezza della mia variazione a gradino
disp('FDT SOGGETTA AD UN DISTURBO A GRADINO DI AMPIEZZA A=-1:')
g=G*A
step(g)
title('RISPOSTA AD UN IMPULSO A GRADINO DI AMPIEZZA A=-1')
%calcolo dell'antitrasformata
disp("ANTITRASFORMATA DI LAPLACE:")
Y=ilaplace(g)
댓글 수: 0
seniha yildirim
2022년 9월 13일
function [a,b] = dft(x)
N= length(x);
n=1:N-1;
t = 2 * pi * (0:(n-1))/N;
for k=1:N
n=1:N-1;
fa= x(n) .* cos(2*pi*n/N);
fb =x(n) .* sin(2*pi*n/N);
a(k) = (2/N) * symsum (fa, n, 0, N-1);
b(k) = (2/N) * symsum (fb, n, 0, N-1);
x = @(t)a/2 + symsum((ak*cos(2*pi*k*n/N))+(bk*cos(2*pi*k*n/N)),k,1:k);
end
end
Can you help me please, it gives error of 'Check for incorrect argument data type or missing argument in call to function
'symsum'.
Error in dft (line 9)
a(k) = (2/N) * symsum (fa, n, 0, N-1);'
댓글 수: 1
Image Analyst
2022년 9월 13일
I suggest you start your own discussion thread for this.
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!