xlswrite in for loop

1 view (last 30 days)
giulia carboni
giulia carboni on 26 Nov 2015
Commented: Walter Roberson on 26 Nov 2015
I have to create an Excel spreadsheet where I enter the parameters produced by a function already created.
I created the excel file (point.xlsx) that must contain 5 columns (subject name, sensor filename , platform file name, type of test, height).
I have to create a for loop and for each line i = 1: n (n is the number of trials = 8) I have to perform
[gykoData, pedanaData] = getSyncronizedData (platform file name, sensor filename, height);
where 'platform file name', 'platform file name' and height you read from excel file.
Then I run the code for the calculation of the parameters that I want to put on the table is that of
gykoData pedanaData res = postureParameters (cop, altezzagyko, fs);
I want to put the results in line ith of a variable matlab (call results) which will have as many columns the number of parameters to be analyzed like
results (i, :) = [res.ellipseArea, res.swayLength, ... and all other parameters].
I also want to put in ith line of a cell matrix of Matlab (eg subjectsCell) the name of the subject and the type of test and write through function xlswrite on an excel file variable subjectsCell in the first two columns and the variable results in the remaining columns.
How can I do this ???
  1 Comment
Walter Roberson
Walter Roberson on 26 Nov 2015
I had to add spacing to make your question readable. I am not sure that I correctly interpreted the line that I broke out as
gykoData pedanaData res = postureParameters (cop, altezzagyko, fs);
Please go back and edit your question to fix any spacing errors I may have made.

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!