equality of an array

2 vues (au cours des 30 derniers jours)
richard
richard le 4 Sep 2014
I have two arrays. A is 46x46; B is 45x45.
I want to check if the first 45 rows and 45 columns in A are equal to the 45x45 B array.
I know to use
tf = is equal(A,B)
but don't know how to incorporate the above parameters into the isequal command.

Réponse acceptée

Honglei Chen
Honglei Chen le 4 Sep 2014
Did you try
isequal(A(1:45,1:45),B)
  1 commentaire
Joseph Cheng
Joseph Cheng le 4 Sep 2014
Modifié(e) : Joseph Cheng le 4 Sep 2014
just to expand on this a bit the A(1:45,1:45) is the A(specified row to another specified row,specified to another specified col)

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Operators and Elementary Operations dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by