making a up down ramp
Ältere Kommentare anzeigen
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 Kommentare
Ameer Hamza
am 30 Okt. 2020
Can you show what have you already tried?
Adam Danz
am 30 Okt. 2020
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
am 30 Okt. 2020
Adam Danz
am 30 Okt. 2020
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
am 30 Okt. 2020
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
am 30 Okt. 2020
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!