Getting Coordinate input from user
Show older comments
I want to get several point 2d coordinates from the user and store the x and y coordinates in separate arrays. I'm using a for loop to do it but it doesn't assign the input to the variables, here's how I'm doing it:
for i=1:5
[x(i),y(i)]=input('Coordinates of Node')
end
3 Comments
Jan
on 16 Oct 2018
it doesn't assign the input to the variables
Please do not explain, what the code does not do, but mention, what the code does do. An exact description contains a hint of the way to solve the problem usually.
Morteza Ghafoori
on 16 Oct 2018
Jan
on 16 Oct 2018
Please post a complete copy of the message in the forum. You see, that the message explains the problem already.
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!