MATLAB: Could anyone tell me how to store the result of each iteration in an array for the following code storing the result in array code: t=4;r=6;for it=1:4output(t,r)=overall_throughput;output_it(t,r,it)=output(t,r);end Best Answer t=4;r=6;for it=1:4output(t,r)=overall_throughput;output_it(t,r,it)=output(t,r);all_output{it} = output;all_output_it{it} = output_it;endNow a complete record of the results of the iterations is stored in all_output and all_output_it Related SolutionsMATLAB: Could anyone help me to solve the issue Replacesum(P,1:k-1)withsum(repmat(P, 1, 1, k-1), 3)... Or you could just think for a few seconds and instead replace sum(P,1:k-1) with P * (k-1) MATLAB: How to remove rows in a multidimensional matrix for k=1:size(A,3) Ak = A(:,:,k); B(:,:,k)= Ak(sum(Ak')~=0,:); end Related QuestionCould anyone tell me how to solve the issueHow to get rid of errorCould anyboby help me to solve the error
Best Answer