Removing values from plot and applying curve
5 views (last 30 days)
Benjamin Großmann on 28 Apr 2021
Edited: Benjamin Großmann on 29 Apr 2021
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) = ;