求助!如何去除含有N​aN的行(小弟是新手​,帮帮忙)。

8 visualizaciones (últimos 30 días)
N/A
N/A el 16 de Nov. de 2022
a=[1 66 NaN; 1 57 1; 1 76 NaN; 1 72 1; 1 76 NaN; 1 83 1; 1 71 NaN;2 53 1; 2 80 1; 2 78 NaN];
[x,y]=size(a);
for i=1:x
if a(i:,3)==NaN;
a(i,:)=[];
end
end
用了这个好像不有用

Respuestas (0)

Categorías

Más información sobre NaNs en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!