Why do I get NaN?
Show older comments
Hello everyone,
Does anyone know why I just get NaN as a result?
D=giuliayearlyDELTA2.Height;
E=str2double(D);
NEW_4=E *0.35 *10;
Thank you!
Accepted Answer
More Answers (2)
KSSV
on 8 Aug 2021
D=giuliayearlyDELTA2.Height;
E=D;
NEW_4=E *0.35 *10;
D is not a string. You need not to ue str2double; already D is in double.
First, Height is already double, so
A = 2;
str2double(A)
Secondly, first element of Height is NaN. Remove it prior to the analysis.
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!