How can I get a variable from inside of the for loop and use it after it ends?
Show older comments
if (M ~= M2)
C=padarray(x,[21,0],0,'post');
sz=size(C)
end
I would like to use 'sz' outside the loop for the rest of my code
1 Comment
James Tursa
on 20 Mar 2018
What is preventing you from doing so? Is the code you show inside of your loop? It would help if you show that code also so we can better understand your problem.
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements 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!