3d matrix initialization and find the specific values after the for loops
Hello my Vf is 42444 *1*1000 matrix. I used this code for finding values for the location of 312 and incrementing of 324 from the 42444 values. But why the final matrix A is 131 * 3*1000. I am expecting 131*1*1000.
Could you help me on that?
Vf= is a 3d matix of 42444 * 1 * 1000;
m = size(Vf, 1)= 42444;
n = size(Vf, 2)= 1;
p = size(Vf, 3)=1000;
A=[m,n,p];
% Loop through the data and fill A
for j = 1:p
index = 1;
for i = 312:324:m
% Assign the value from Vf to the corresponding location in A
A(index, :, j) = Vf(i, :, j);
index = index + 1;
end
endHello my Vf is 42444 *1*1000 matrix. I used this code for finding values for the location of 312 and incrementing of 324 from the 42444 values. But why the final matrix A is 131 * 3*1000. I am expecting 131*1*1000.
Could you help me on that?
Vf= is a 3d matix of 42444 * 1 * 1000;
m = size(Vf, 1)= 42444;
n = size(Vf, 2)= 1;
p = size(Vf, 3)=1000;
A=[m,n,p];
% Loop through the data and fill A
for j = 1:p
index = 1;
for i = 312:324:m
% Assign the value from Vf to the corresponding location in A
A(index, :, j) = Vf(i, :, j);
index = index + 1;
end
end Hello my Vf is 42444 *1*1000 matrix. I used this code for finding values for the location of 312 and incrementing of 324 from the 42444 values. But why the final matrix A is 131 * 3*1000. I am expecting 131*1*1000.
Could you help me on that?
Vf= is a 3d matix of 42444 * 1 * 1000;
m = size(Vf, 1)= 42444;
n = size(Vf, 2)= 1;
p = size(Vf, 3)=1000;
A=[m,n,p];
% Loop through the data and fill A
for j = 1:p
index = 1;
for i = 312:324:m
% Assign the value from Vf to the corresponding location in A
A(index, :, j) = Vf(i, :, j);
index = index + 1;
end
end matlab, 3d matix MATLAB Answers — New Questions