gap in the plot
6 次查看(过去 30 天)
显示 更早的评论

How can I make the red plot start in the same place (from 1)?
0 个评论
回答(1 个)
Walter Roberson
2019-10-31
red_x = red_x - min(red_x) + 1;
plot(blue_x, blue_y, 'b', red_x, red_y, 'r')
6 个评论
Walter Roberson
2019-10-31
I see.
Your processing requires a gap. In form2 you have
i=max(find(X<z));
which would be empty if z is exatly equal to the first X because you are attempting to process right to the left margin.
You can reduce the width of the gap by reducing dx, but you cannot eliminate the gap.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
