hello , I have vector a = [ 1 -1 1 1 ...] which is 30x1 and vector b = [-1 1 -1 .. ] of same size I want to check that if vector a is equal ( containing the same element) of vector b then print msg " vectors are equal " . thanks

1 件のコメント

David Goodmanson
David Goodmanson 2017 年 10 月 17 日
Hi alm,
for the first part you can check with all(a==b)

サインインしてコメントする。

回答 (1 件)

Guillaume
Guillaume 2017 年 10 月 17 日

0 投票

What is the difficulty?
if isequal(a, b)
disp('Vectors are equal');
end

カテゴリ

ヘルプ センター および File Exchange で Dates and Time についてさらに検索

質問済み:

2017 年 10 月 17 日

回答済み:

2017 年 10 月 17 日

Community Treasure Hunt

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

Start Hunting!

Translated by