how to compare cell arrays of different lengths?
Ältere Kommentare anzeigen
clc;clear; a=int64(1:3)'; out=num2cell(a) b = int64(1:4)'; out2 =num2cell(b)
index = out == out2;
index doesn't compute because out and out2 are of different lengths. How to make it work?
1 Kommentar
Sven
am 19 Apr. 2016
What would you like the actual answer to be?
For example, the statement
index = out == out2
is definitely not true, so do you want index to return false? Or do you want to know which of the cells in out are equal to their equivalent index in out2?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!