Hello everyone. Now I come across such a problem: given the coordinates of all points of the closed curve acbd, now I want to find all points of the curve ACB and save them. The code I write is as follows, but there are always mistakes. I
이전 댓글 표시
Where M0 is the set of all points.
CODE:
dc=centroids(:,2);
idx2=MO(:,1)>=-50;
idx3=MO(:,1)<=100;
idx4=MO(:,2)>=dc;
dataC=MO(idx2,:);
dataD=MO(idx3,:);
dataE=MO(idx4,:);
dataF=intersect(dataC,dataD,'rows');%Finding the intersection of dataF,
dataG=intersect(dataF,dataE,'rows');%Finding the intersection of dataG

댓글 수: 7
Wesley
2021년 5월 31일
Wesley
2021년 5월 31일
Wesley
2021년 5월 31일
KSSV
2021년 5월 31일
What error you get? In the mat file, centroids is not defined and MO is not defined. Show us the complete code which lead to your error along with the error.
Wesley
2021년 5월 31일
Wesley
2021년 5월 31일
Wesley
2021년 5월 31일
답변 (1개)
Here is your data looks like
s = load('M0.mat');
[x,y] = deal(s.M(:,1),s.M(:,2));
plot(x,y)
카테고리
도움말 센터 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

