How to plot a piece-wise function so I can then shift/compress it afterwards
Show older comments
Good afternoon everyone. I am trying to find a way to plot the following piecewise function in MATLAB. I tried to use the inline function to create each piece but I am not sure how to plot it as a piecewise. I tried to use a heaviside function but it looked a bit off. Here is my piecewise I have to plot for x(t):
from 0<=t<2 x(t)=(1//2)exp(t).....
from 2<=t<4 x(t)= 2*t-8.....
0 otherwise
afterwards i have to do the code for x(-t-1) which is an axis flip and a left shift I believe.
Any help from the gurus? I know there is more than one way to skin a cat but seeing as how I will be manipulating the piecewise function by shifting it and compressing it I would think it would need to be strictly defined in range
Accepted Answer
More Answers (0)
Categories
Find more on Symbolic Math Toolbox 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!