don't display some part of a graph

10 次查看(过去 30 天)
I have plotted a graph with following code. I want to know how can I define that in the highlighted part in attachment that Ic > 2.6, it won't be displayed.
plot (Ic,depth)
set (gca, 'Ydir', 'reverse')
grid on
xlabel('I_c')
ylabel('Depth (m)')

采纳的回答

KSSV
KSSV 2022-5-29
idx = Ic > 26 ; %get indices of Ic which are greater than 26
depth(idx) = NaN ; % make those respective value nan
plot(Ic,depth) ; % now those values wont be displayed
  3 个评论
KSSV
KSSV 2022-5-29
Yes.. Why not. Do that indexing before plotting the fourth subplot Or save the value into a different variable and plot.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

标签

产品


版本

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by