Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
matlab怎么画出锯齿线?该图就像一把锯子,斜率相同,但峰值不同。
例如:
Peak # Start End 1 (0.2,2.2) (1.5,0) 2 (1.5,3) (3.27,0) 3 (3.27,1.2) (3.98,0) etc.
只需使用plot您的点的 x 和 y 坐标:
plot
x = [0.2 1.5 1.5 3.27 3.27 3.98]; y = [2.2 0 3 0 1.2 0]; plot(x, y)
除非你不想要垂直线?你可以这样做:
x = [0.2 1.5 nan 1.5 3.27 nan 3.27 3.98]; y = [2.2 0 nan 3 0 nan 1.2 0]; plot(x, y)