Assign multiple results to the same variable
Show older comments
I'm doing a code that uses while, and inside that while is a variable whose value gets changed every instance, I want to store all those values on a single variable to table it later, how can I do that?
3 Comments
Mathieu NOE
on 31 Aug 2023
indexing the varoable is the solution
k = 0;
while ....
k = k+1;
data(k) = ...
end
Chesus
on 31 Aug 2023
Accepted Answer
More Answers (0)
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!