import data from numeric excel file e+08 NaN problem
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I am trying to import excel data into matlab.
Well, we all know that we can do it by just clicking 'import data' or using other functions.
Btw, problem is one of the row, the whole number are to long just like this. "2.21911e+087251.96"
So when I checked output type as numeric table, the numbers of this row are replaced into NaN.
But when I selected table, at least the row saved as Text type.
You might say that change the type text into Numbers(double). It also NaN
I want to solve this problem and these are the ways I tried.
% Ouput Type Table named "Untitled"
% # 1
temp = table2array(Untitled); % now it's turned to str array
tempNum = str2num(temp); % Error using str2num Input must be a character vector or string scalar
% # 2
temp2 = Untitled{:,:}; % now it's turned to str array
str2double(temp2); % it worked but still "2.21911e+087251.96" row changed into "NaN"
% # 3
temp3 = table2cell(Untitled); % cell type
blahblahblah
% anyway also not worked
% Can you people help me? X(
2 Commenti
Ameer Hamza
il 6 Mar 2020
Can you provide a sample excel file? I will help in suggesting a solution to read data properly.
Guillaume
il 6 Mar 2020
"whole number are to long just like this. 2.21911e+087251.96"
2.21911e+087251.96
is not a valid number notation, in excel, matlab or mathematically, so what number should that be?
You either need to explain how that expression should be interpreted or go back to whatever generated that expression and fix it so it outputs valid numbers.
Risposta accettata
darova
il 6 Mar 2020
Boundaries of double precision
>> realmin
ans =
2.2251e-308
>> realmax
ans =
1.7977e+308
But you have 2.21911e+087251.96
There is no float number for exponent
>> 2E1
ans =
20
>> 2E1.1
2E1.1
|
Error: Unexpected MATLAB expression.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Data Import from MATLAB in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!