This is so easy I am sure...but I have no idea how to look it up.(adsbygoogle = window.adsbygoogle || []).push({});

I want to execute a loop from i = 1 to N

During each iteration I want to prompt the user for the i-th input. Let's say, I want to ask for

x1, x2, x3, ..., xN.

I should be able to write something like:

But the '&' does not seem to be the proper way to do this.....Code (Text):

for i:N

x(i) = input(' Enter value of x' & i)

next

Anyone know this one?

Thanks!

**Physics Forums - The Fusion of Science and Community**

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

# MATLAB Really Simple Question

Loading...

Similar Threads - MATLAB Really Simple | Date |
---|---|

How to program this in Matlab | Feb 28, 2018 |

Matlab Making a short test for self-adjointness | Feb 23, 2018 |

Matlab Plotting Coordinate Transformations in Matlab | Feb 12, 2018 |

Plotting cosine in matlab looks really funky | Oct 6, 2013 |

**Physics Forums - The Fusion of Science and Community**