Not enough input arguments.
Show older comments
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.
Accepted Answer
More Answers (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)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!