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!