필터 지우기
필터 지우기

how to select the required value from among all values

조회 수: 1 (최근 30일)
jaah navi
jaah navi 2019년 4월 14일
댓글: madhan ravi 2019년 4월 14일
If I am having the data as
1 2 3
4 5 9
6 6 12
6 3 9
10 11 21
.
.
.
4 6 10
where the first and second number add to give the third number for all the combinations
if i need to choose the addition of two values that gives the result 9 ,and suppose there are two possibilities how to choose any one of the possibility.
could anyone please help me on this.
  댓글 수: 3
Walter Roberson
Walter Roberson 2019년 4월 14일
I do not see how factor() could be useful in this question??
madhan ravi
madhan ravi 2019년 4월 14일
Ah I misunderstood the question.

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

답변 (1개)

Walter Roberson
Walter Roberson 2019년 4월 14일
row9 = find(YourData(:,3) == 9);
one_of_them = row9( randi(length(row9)) );

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by