how to compare the values of two matrix??

조회 수: 3 (최근 30일)
Sahar abdalah
Sahar abdalah 2015년 7월 31일
댓글: Sahar abdalah 2015년 7월 31일
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에서 Resizing and Reshaping Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by