How to create a matrix using linespace between one ginput and every points from a 10x10 matrix.
Show older comments
I have to create a matrix using linespace comman between one ginput and another point is taken from a for loop of 10x10 matrix. Here is what i have done so far , i dont know how to solve the error.
[x1,y1]=ginput(1)
for i=1:10
for j=1:10
[x2,y2]=deal(x(i),y(j))
x = linspace(x1,x2,5)
y = linspace(y1,y2,5)
X=round(x)
Y=round(y)
z=[X; Y]
end
end
how do I write the command for what i'm looking for ?
1 Comment
Whenever you mention an error in the forum, post a copy of the complete message. It is easier to fix and error than to guess, what the error is.
This description is not clear to me: "I have to create a matrix using linespace comman between one ginput and another point is taken from a for loop of 10x10 matrix."
What are the inputs and what do you want as output?
Answers (0)
Categories
Find more on Surrogate Optimization 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!