I want to convert my .csv file to fit my code
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hi Everybody, I have excel file and I have modified it into number of columns manually. To fit my code. But, as I have large amount of data it is difficult to change the structure manually. Can I generate a automatic script to modfie my original excel into number of columns. I have added the both original and modified excel. And the code i am using to fetch the data from excel.
Thanks in advance.
[~, ~, dataOverview] = xlsread('Overview_modified.xlsx',sheets(ic,:),'A3:E134');
dataOverview(cellfun(@(x) ~isempty(x) && isnumeric(x) && isnan(x),dataOverview)) = {''};
%extracts the data into seperate columns as per the need
[n_l,~] = size(dataOverview);
CellType = dataOverview(:,1);
Cell = dataOverview(:,2);
Sequence = dataOverview(:,3);
TestID = dataOverview(:,4);
TestName = dataOverview(:,5);
1 comentario
JohnGalt
el 6 de Jun. de 2018
It is absolutely possible in Matlab, though it would not be my first choice. I'd suggest doing this formatting outside of matlab, perhaps in excel... or convert your data to csv which will reduce the computational overhead.
To do it in matlab, you essentially read it all in as a giant array and then reorganise it - as you would on another platform.
Respuestas (0)
Ver también
Categorías
Más información sobre Spreadsheets en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!