How to save matrixes resulted from a running loop for further use in MATLAB
1 view (last 30 days)
KSSV on 28 Mar 2023
Let mxn be your matrix size and you are running loop ntimes. In this case you can save the matrix in the loop using the below code snippet.
A = zeros(m,n,n) ;
for i = 1:n
A(:,:,i) = % calculations/ formula