How to sketch the following signal? x(t)= 3u(t-10)+ 4u(-t+3)-r(t+2)+4r(t)-2u(-t-2)-2r(t-3)-2u(t-4)+r(-t-5)
Show older comments
Since the question contains both step and ramp, how to write the code for it?
11 Comments
KSSV
on 20 Nov 2017
What are r and u ? Do you have any ranges?
Mohamed Mohamed
on 21 Nov 2017
Birdman
on 21 Nov 2017
Check my answer.
Mohamed Mohamed
on 21 Nov 2017
Birdman
on 21 Nov 2017
piecewise is a built-in function in MATLAB, it should be located in your MATLAB folder.
Mohamed Mohamed
on 21 Nov 2017
Mohamed Mohamed
on 21 Nov 2017
Birdman
on 21 Nov 2017
Firstly, if piecewise gives you error, then find the code for it from internet, put it in your current directory, then run the code. You should see the code working and understand it. Next steps can be done later.
Birdman
on 21 Nov 2017
This is the output image for x(t).
Walter Roberson
on 24 Nov 2022
piecewise requires the Symbolic Toolbox
Accepted Answer
More Answers (0)
Categories
Find more on Entering Commands 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!