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.
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!