MATLAB: Puting empty value in numeric array

empty value numeric matrix

Easy question for advanced users, big question for a beginner like me.
I want to put an empty value or no value into a numeric matrix.
As an example;
if true
for n=1:4;
If %some condition is satisfied%
Data(n,1)= % a numeric value like 4%
Else
Data(n,1)= % put nothing in this row %
end
End
end
Something like this,
Data(1,1)=3
Data(2,1)=4
Data(3,1)= no value,it exist but no value in it
Data(4,1)=5

Best Answer

How about putting a NaN in it?
Data(n,1)= NaN;