I want to import excel data into matlab, I've already tried importdata, but there are some things that do not fit right. I get "NaN" instead of numbers in the array
I want to import excel data into matlab, I've already tried importdata, but there are some things that do not fit right. I get "NaN" instead of numbers in the array
Have you tried using xlsread?
xlsread(nome do arquivo,pasta,intervalo)
Example:
% Criar um arquivo do excel chamado Exemplo.xlsx.
values = {1, 2, 3 ; 4, 5, 'x' ; 7, 8, 9};
headers = {'primeiro','segundo','terceiro'};
xlswrite('Exemplo.xlsx',[headers; values]);
% Pasta tem então os dados (Exemplo.xlsx):
primeiro Segundo Terceiro
1 2 3
4 5 x
7 8 9
%Ler os dados numéricos da primeira pasta do arquivo:
filename = 'Exemplo.xlsx';
A = xlsread(filename)
A =
1 2 3
4 5 NaN
7 8 9
For more information, visit link
Export by excel in csv format, can be separated by comma or space
The read process only needs to use csvread(filename)
Usage example: arq = csvread(arqExcel.csv)
Source: link