MATLAB Answers

How to compare element between two numbers

1 ビュー (過去 30 日間)
ramu krishnan
ramu krishnan 2019 年 9 月 23 日
Answered: James Tursa 2019 年 9 月 23 日
How to compare element by element between two sequences for e.g i have K=[ 152 156 123 231 0] AND o=[ 173 152 197 234 67] if we compare these two numbers i need result value as M=[2 1 2 1 2] in matlab

  1 件のコメント

Rik
Rik 2019 年 9 月 23 日
I don't see how your input and output are related. Can you provide more details about what should happen?

サインイン to comment.

件の回答 (1)

James Tursa
James Tursa 2019 年 9 月 23 日
Like Rik, I am not sure what comparison you are doing based on your terse description. Maybe this, but it doesn't match your stated desired output:
M = (o > K) + 1;
Can you elaborate more?

  0 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。

タグ


Translated by