how to use nan matrix

1 visualización (últimos 30 días)
lina
lina el 6 de Abr. de 2014
Editada: lina el 7 de Abr. de 2014
Hi all,
please I want to Know why the P variable does not included in the p nan matrix like other variable this is the code:
t=ones(30,41)*nan;
sal=ones(30,41)*nan;
Z=ones(30,41)*nan;
p=ones(30,41)*nan;
for i=1:41
ncload(['wod_00',num2str(cast(i)),'O.nc']);
% pause
[n,m]=size(Temperature);
if (~exist('Pressure'))
t(1:n,i)=Temperature(:);
Z(1:n,i)=z(:);
else
t(1:n,i)=Temperature(:);
Z(1:n,i)=z(:);
sal(1:n,i)=Salinity(:);
if lat>20
exist('Salinity', 'var')
sal(1:n,i)=Salinity(:);
exist('Pressure','var');
p(1:n,i)=Pressure(:);
end
end
end
THANK YOU FOR WHOM WHO HELP me :(
  6 comentarios
Jan
Jan el 6 de Abr. de 2014
@lina: You are welcome. Could you clarify what this means:
the P variable does not included in the p nan matrix
lina
lina el 7 de Abr. de 2014
Editada: lina el 7 de Abr. de 2014
mr. simon I just solve the problem after ur correction above. thank you
dpd the loop is work

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Logical 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!

Translated by