making a up down ramp
显示 更早的评论
For a assignment I am supposed to make a ramp function that goes up plaeteous and then goes back down. My proffesor said use a time array but I do not know what that means. I tried using a peicewise command but that did not work.
6 个评论
Ameer Hamza
2020-10-30
Can you show what have you already tried?
Adam Danz
2020-10-30
You're describing a step function which can be plotted several ways. Step functions have duplicate x-values when the function steps upward or downward making them easy to create using a simple plot() command. You could also use Matlab's heaviside() function or step().
Alexander Manderfeld
2020-10-30
Adam Danz
2020-10-30
That's even easier.
By the way, I can assure you the functions I mentioned early work. I think what you mean is that you tried the functions but they didn't achieve the trapezoidal changes you described in the comment above.
Stephan
2020-10-30
Show us what you have done so far and where your specific problem is. Also is there more information about the assignment? Maybe piecewise is not that what your professor wants you to use.
Alexander Manderfeld
2020-10-30
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Logical 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!