I would think this should be an easy one...(adsbygoogle = window.adsbygoogle || []).push({});

For i=0 to i=M, I want to run a a calculation and get M different results. I want to store those M results as a vector so I can plot them.

Simplify version below:

for i=0:10

T = i/2;

T

end

This spits out a list of numbers: 0, 0.5, 1... How do I store that list as a vector and plot it?

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

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

# Use results of a 'for' loop to formulate a vector

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