Aloha guys,(adsbygoogle = window.adsbygoogle || []).push({});

I am just having trouble getting MatLab to output only the last variable of my "for loop."

If anyone can help all I am looking for is an example of notation.

p.s. I have done this before just not in a while and will continue to look through my old scripts and functions. just not in a while.

Thank you,

HWN Phisics Nerd :P

**Physics Forums | Science Articles, Homework Help, Discussion**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# How to get the last variable of a for loop in MATLAB

Tags:

Have something to add?

Draft saved
Draft deleted

**Physics Forums | Science Articles, Homework Help, Discussion**