plz anyone solve the following question for me in matlab and reply quick.regards

回答 (2 件)

Conrad
Conrad 2012 年 11 月 5 日
Try this
X=[-4 -1 0 2 10];
Y=[-5 -2 2 5 9];
[~,idx] = find(X>Y);
Rick
Rick 2012 年 11 月 5 日
編集済み: Rick 2012 年 11 月 5 日
If the scale of X and Y is the same, you could use a "for" loop to go through every element.
for i=1:numel(X)
if X(i) > Y(i)
% Do something
end
end
or you could use the function "gt"
type "help gt" in matlab without quotes for more details

カテゴリ

ヘルプ センター および File ExchangeMatrix Indexing についてさらに検索

質問済み:

ali
2012 年 11 月 5 日

Community Treasure Hunt

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

Start Hunting!

Translated by