You can compare two matrices A
and B
by using the isequal()
function in Matlab. To compare 66x67x67 cells with each other, you can use nested loops to iterate over each element of the cells and use the isequal()
function to compare the matrices at each cell.
Here is an example code:
main.m527 chars21 lines
In this example, if any two matrices at corresponding cells are not the same, the loop will exit and print "The cells are not the same". Otherwise, it will print "The cells are the same".
gistlibby LogSnag