How do I replace zeroes in a <logical> 0 and 1 array with NaNs?
Ältere Kommentare anzeigen
Hey,
I have a logical array with ones and zeroes and now I would like to replace the zeroes with NaNs but can´t find the right commend.
A(A==0) = nan; NaN's cannot be converted to logicals.
A(~A) = NaN; NaN's cannot be converted to logicals.
Also tried this: A=num2cell(A);
Who can help me out?
Greetings, A matlab hero :) A=num2cell(A);
Akzeptierte Antwort
Weitere Antworten (1)
Tessa
am 9 Dez. 2014
0 Stimmen
Kategorien
Mehr zu Analysis of Variance and Covariance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!