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 | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

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

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

# MATLAB Really Simple Question

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