how can import numeric matrix into NaN matrix?

조회 수: 1 (최근 30일)
lina
lina 2014년 3월 25일
편집: lina 2014년 3월 25일
hey,
i cant import numeric matrix into NaN matrix that i used in my program
i have this IF loop
if (~exist('Salinity,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(:);
p(1:n,i)=Pressure(:);
end
the data is still appear as nan matrix in sal and p variables but the loop is work with t and z
how should i do to keep it work with it like others?
thank you .
  댓글 수: 3
Walter Roberson
Walter Roberson 2014년 3월 25일
There is no such thing as an "if loop". There are "for loop" and "while loop" but "if statement".
lina
lina 2014년 3월 25일
편집: lina 2014년 3월 25일
Mr. Rajiv thank you very much for your help the syntax is correct

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by