Not enough input arguments.
이전 댓글 표시
I am really new to use Matlab, can somebody help me?
Write a function in Matlab that generates the output y(t):

I did not study Matlab before, but I have to use Matlab to solve EE question. The following is my cord.
Please help me:
function u1=unit_step(x)
if x>=0
u1=1;
else
u1=0; end
function u2=unit_step(x)
if x>=t
u2=0;
else
u2=1; end
f = @(x) (x-t).*exp(x-t).*u1.*x^2.*exp(-x).*sin(x).*u2
Q = integral(f,-Inf,Inf)
---------------------Error using HW2_7 (line 2) Not enough input arguments.
채택된 답변
추가 답변 (1개)
u=@(z) z>=0;
f = @(x) (x-t).*exp(x-t).*u(x).*x^2.*exp(-x).*sin(x).*u(t-x)
Q = integral(f,-Inf,Inf)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!