Answer the question
In order to leave comments, you need to log in
How to index inside a 4 dimensional matrix in Matlab?
There is a 10x10 matrix, each element of which is an array of 3 elements. To index by matrix elements and write vectors with the same values into it, you need to do this:
for i = 1:10
for j = 1:10
matrix(:, :, i, j) = [1; 2; 3];
end
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question