I want to convert my .csv file to fit my code

3 Ansichten (letzte 30 Tage)
Manojkumar Kuncham -ETEC-
Manojkumar Kuncham -ETEC- am 30 Mai 2018
Kommentiert: JohnGalt am 6 Jun. 2018
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 Kommentar
JohnGalt
JohnGalt am 6 Jun. 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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by