how to use nan matrix

1 次查看(过去 30 天)
lina
lina 2014-4-6
编辑: lina 2014-4-7
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 个评论
Jan
Jan 2014-4-6
@lina: You are welcome. Could you clarify what this means:
the P variable does not included in the p nan matrix
lina
lina 2014-4-7
编辑:lina 2014-4-7
mr. simon I just solve the problem after ur correction above. thank you
dpd the loop is work

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by