To check if the content of two cell arrays are the same, you can use the isequal
function.
Here's an example:
main.m198 chars9 lines
Output:
main.m40 chars2 lines
Note that the order of the elements matters when using isequal
. If you want to check if the content is the same regardless of the order, you can use sort
to sort the elements before comparing:
main.m210 chars9 lines
Output:
main.m36 chars2 lines
gistlibby LogSnag