필터 지우기
필터 지우기

comparison of two column vectors

조회 수: 2 (최근 30일)
Chaudhary P Patel
Chaudhary P Patel 2022년 4월 9일
댓글: Chaudhary P Patel 2022년 4월 19일
sir/madam i have two column vectors, i want to compare element by element and want to know which is large or small.
please help me, how can i write command for it.

답변 (1개)

per isakson
per isakson 2022년 4월 9일
편집: per isakson 2022년 4월 9일
An example
%%
v1 = rand( 6,1 );
v2 = rand( 6,1 );
%%
v1 > v2
ans = 6×1 logical array
1 0 0 1 1 1
This result tells us that the first, fourth, fifth and sixth element of v1 are larger than the corresponding elements of v2
  댓글 수: 8
Chaudhary P Patel
Chaudhary P Patel 2022년 4월 19일
@per isakson @Michael Kleder @Matt J Sir the real problem is, I have 2 type of Column vector of 6X1
F_s1=(1;5;7;4;6;8)
F_s2=(0;5;8;3;7;7)
and
F_r1=(0;1;5;7;4;3)
F_r2=(1;2;11;1;5;9)
sir i have to compare F_s <= F_r each elemet one by one and which satisfy the condition for that some other actions i have to take. So suggest me how can i do it element by element not a complete one.
Chaudhary P Patel
Chaudhary P Patel 2022년 4월 19일
please @per isakson sir, suggest me how can i compare element by element?

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

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by