I have few points (0,8),(0,64),(28,1)(28,66),(9,47)(9,20),(54,20)(54,47),(21,10),(21,51)
Is there any matlab command which checks the x coordinate and select only unique point (based on x coordinate)
e.g (0,8),(28,66)(9,47),(54,20),(21,10)

 채택된 답변

Bruno Luong
Bruno Luong 2019년 8월 17일

0 개 추천

use UNIQUE command

댓글 수: 4

I have points in this form
0 8
0 59
4 20
4 47
5 23
5 44
9 20
when i am applying unique I m getting
1
2
3
4
5
6
7
8
9
10
11
code is
points = [];
for i = 1:length(right_side)
I = find(left_side == right_side(i));
for j=1:length(I)
points = [points;a(i),a(I(j))];
end
end
points
sadiqa ilyas
sadiqa ilyas 2019년 8월 17일
How to arrange these points in table form
P=[0 8
0 59
4 20
4 47
5 23
5 44
9 20]
[~,i]=unique(P(:,1));
P(i,:)
sadiqa ilyas
sadiqa ilyas 2019년 8월 17일
It works Thanks but how to arrange in table 8*n form

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Powertrain Blockset에 대해 자세히 알아보기

질문:

2019년 8월 17일

댓글:

2019년 8월 17일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by