??? Error using ==> horzcat, CAT arguments dimensions are not consistent.
Ältere Kommentare anzeigen
I have two cell arrays, both of length n. One array contains nX1 strings, while the other array is contains nx1 type double. I'm trying to create a new variable that is nx2.
The error doesn't seem to make sense to me, since the dimensions of both arrays are identical. This is probably a novice error, so I'll lay out exactly what I've done:
A = {a, b, c, d, ..., n}
B = {1,2,3,4....n}
C = [A,B]
??? Error
If I attempt this:
C = [A;B]
The new variable that is created is (n+1)x1 containing all of the cells in A plus a new cell with text (nx1 double), but lacking any of the values stored within B.
A and B are variables that have been imported using xlsread
If anyone can help me with the problem and shed some light on why exactly this is happening I would greatly appreciate it. Thank you.
Antworten (1)
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!