I want NaN in accuracyC if: its counterpart in RTc is nan but not when the value in accuracyC is 0.
index = isnan(RTc) & ~(accuracyC == 0); accuracyC(index) = NaN;
It is slightly more efficient to write x~=0 instead of ~(x==0).
I want NaN in accuracyC if: its counterpart in RTc is nan but not when the value in accuracyC is 0.
index = isnan(RTc) & ~(accuracyC == 0); accuracyC(index) = NaN;
It is slightly more efficient to write x~=0 instead of ~(x==0).
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!