Reputation: 649
I am creating multiple handles for points taken from ginput(n)
where n is no. of points to be taken. n
is input from user.I want to create handles for all points and pass them using array to another function. SO code looks like this:
n=input('Enter no. of points ');
[t]=ginput(n);
//I want to create handles for all points in t.
function DrawBezier(//pass handles to this function )
I think one idea is to create an array and put handles in that. Now pass that array.
Upvotes: 0
Views: 216
Reputation: 13886
ginput
doesn't return a handle, but the cooordinates of the points clicked, so you can do something like:
[x,y] = ginput(n); % x and y are n x 1 arrays
function DrawBezier(x,y)
Upvotes: 1