How do i compile different variables into 1 variable?
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Image Analyst
2022년 12월 12일
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
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!