Ask for plotting rectangular pulse with controlled width
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi; I would like to plot a series of rectangular pulse from a vector data input. The plot profile would create a rising edge of the pulse for a positive number and create the falling edge for the negative of that number. The plot should separate color for each represented number.
For example, if vector input X is [1 -1 2 -2 3 4 1 -4 -1 -3] Amplitude of data ‘1’ is 5, Amplitude of data ‘2’ is 4, Amplitude of data ‘3’ is 3 and Amplitude of data ‘4’ is 2
So, the input X got index from t(1) to t(10). The output of plot or chart should look like the inserted image.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/160770/image.bmp)
How would I write a MATLAB code for this work?
Thank you. Bundit
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!