Saving outputs of a funtion inside nested for loop in organized fashion

조회 수: 1 (최근 30일)
Burke Morse
Burke Morse 2021년 11월 20일
편집: Matt J 2021년 11월 21일
I am trying to save the outputs of a function inside multiple for loops. I am changing the input to the function with each nested for loop. I cannot think of a good way to organize the data I am collecting.

답변 (1개)

Matt J
Matt J 2021년 11월 21일
편집: Matt J 2021년 11월 21일
Instead of returning 20 separate outputs, you could have paramA return them as fields of a struct. Then you could save each output as an element of a struct array.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by