find Nan in cell
Afficher commentaires plus anciens
I want to find nan element in A,
A={[],[],[31],[2,1]}; %first case
A1={[],[2],[3],[6]}% second case
I used this code, but did not give me the correct answer
P=cellfun(@(x) isnan(x),A,'UniformOutput',false);
after that, check if first and second elemnt is nan, put A as [];
aswer should be
A=[] % first case
A1={[],[2],[3],[6]}% second case
2 commentaires
KALYAN ACHARJYA
le 11 Juil 2019
Check here
madhan ravi
le 11 Juil 2019
Provide an another example, as I understand A should contain [] as many [] are observed in A1 ? Is that true?
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!