Removing values from plot and applying curve

1 回表示 (過去 30 日間)
Joel Schelander
Joel Schelander 2021 年 4 月 28 日
編集済み: Benjamin Großmann 2021 年 4 月 29 日
I want to remove the values situated on y=0 and x=0. How can I do this?
Is there a way to translate this into a curve somehow?
D:34213580x1 double
I3:34213580x1 double
figure
plot(I3,D,'.')

採用された回答

Benjamin Großmann
Benjamin Großmann 2021 年 4 月 28 日
編集済み: Benjamin Großmann 2021 年 4 月 29 日
You can remove values from an array by setting them to empty. Use logical indexing to address the values that you want to delete.
D_IdxToDelete = D == 0; % or "D_IdxToDelete = D <= DLIM;" if you do not have exact zeros and want to specify margins
I3_IdxToDelete = I3 == 0; % or "I3_IdxToDelete = I3 <= I3LIM;" if you do not have exact zeros and want to specify margins
% Use "&" (and) or | (or) to combine different logical index arrays
% Idx to delete when D OR I3 is zero.
IdxToDelete = D_IdxToDelete | I3_IdxToDelete;
% delete the entries
D(IdxToDelete) = [];
I3(IdxToDelete) = [];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

タグ

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by