how to compare the values of two matrix??

3 次查看(过去 30 天)
hello, I have two matrix A and B. the size of the two matrix is 1000*1000. my goal is to compare the values of the two matrices. Please, help me to make a small program that compares the two matrix. if A and B have the same values, the program returns 'equal matrix' otherwise returned ' different matrix'.thanks in advance.

采纳的回答

Azzi Abdelmalek
Azzi Abdelmalek 2015-7-31
编辑:Azzi Abdelmalek 2015-7-31
id=isequal(A,B)+1
str={'different matrices','equal matrices'};
str{id}

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by