How do i compile different variables into 1 variable?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi. I'm trying to compile different values of summation into variable, test_D3.
What's going on is, I use for loop to apply the max function on different values of LoadFile1. After, I save the result in test_D3 variable. Problem is, I would like to compile each diffrent results of test_D3 into 1 new variable.
for j = 1:1:5
% Define files to process
sprintf('Current H File Creation for Digging (N=100), N = %d',j)
File1 = 'GFGD_Jumping_All_%d_01-Jul-2022.mat'; %'GFGD_Walking_Filter_%d_14-Jan-2022.mat'
WavFile1 = sprintf(File1,j);
LoadFile1= importdata(WavFile1);
% Apply 'max' function on GFCC file and store the result in a new cell (summation) consecutively
summation = max(LoadFile1);
test_D3 = vertcat(summation);
end
0 Kommentare
Antworten (1)
Image Analyst
am 12 Dez. 2022
What is LoadFile1?
whos LoadFile1
Isn't the max value of it a scalar? If so why don't you just do this
test_D3(j) = summation;
If you have any more questions, then attach your data (at least 2 mat files) with the paperclip icon after you read this:
0 Kommentare
Siehe auch
Kategorien
Mehr zu Time Series Objects finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!