Merging xlsx data with different lengths

Hi
I trying to analyse multiple subjects gait.
The data (angle,emg, etc) I have ploted again the cycle %.
However, the data I have is of different vector length. As subjects have different walking speed.
The data is place into excel files with multiple sheets.
E.g. Subject1.xlsx, subject2.xlsx, etc all have 12 sheets of data.
1)What should I do first?
2) Since they are different length should I extrapole all to same length? (if so how)
3) is it possible to loop a code that read and extract out the data is each xlsx file and sheets, and allows me to merge.
If there is an guide or tutorial on how to code and loop xlsx files, that will be greatly appreciated.

Risposte (1)

hi
see :
then you can build on this simple script below (given here only for 1 sheet) below to stack / concatenate your data and export it to excel or txt files
% initialization
data_all = [];
for i = 1:nb_of_files
data(i) = readtable('Excel_File',num2str(i),'.xlsx');
% insert your code here
% e.g. data concatenation
% if data has always same nb of columns, but variable nb of rows , you can do :
data_all = [data_all data];
end

Tag

Richiesto:

il 19 Ott 2020

Risposto:

il 19 Ott 2020

Community Treasure Hunt

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

Start Hunting!

Translated by