how to save coordinates in a text file?
10 views (last 30 days)
I've used ''inpolygon'' function and I want to save the red points in a txt file in form of 2 columns of x and y, for ex. :
how can I do that? I'm new to matlab :D
The inpolygon function:
[in,on] = inpolygon(xq,yq,xv,yv);
William Rose on 17 Sep 2022
I do not see the matrix of selected points which you want to save. Maybe that is the problem. Here is an example:
N=100; %total number of points
xv=[.5 .9 .5 .1 .5];
yv=[.1 .5 .9 .5 .1];
Try that. It should save the coordinates of the selected points as a 2-column text file.