don't display some part of a graph

3 ビュー (過去 30 日間)
Mohammad Sadegh Nasirianfar
Mohammad Sadegh Nasirianfar 2022 年 5 月 29 日
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.
Mohammad Sadegh Nasirianfar
Mohammad Sadegh Nasirianfar 2022 年 5 月 29 日
thanks a lot. appreciate you

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-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