MATLAB Answers

Dimension of arrays being concatenated are not consistent.

51 views (last 30 days)
Julia Hotze
Julia Hotze on 26 Jul 2019
Commented: Rik on 29 Jul 2019
I am working with an excel report that I am trying to sort based on the values in one column in the excel sheet and then export excel files that pertain to the data for the specific ID. I need help figuring out where the values are not consistent and what I need to change.
Currently, I am getting the error
Error using vertcat Dimensions of arrays being concatenated are not consistent.
Error in Midtown (line 91) xlswrite ([path abc],[headers; C]);

  4 Comments

Show 1 older comment
Walter Roberson
Walter Roberson on 27 Jul 2019
Is headers a cell array but C is perhaps a numeric array? If so then [headers; num2cell(C )]
Julia Hotze
Julia Hotze on 29 Jul 2019
There are 22 columns. The number of rows varies. C is not a numeric array
Rik
Rik on 29 Jul 2019
The error indicates the number of columns is not equal between the two. Have you confirmed both are 22 columns just before this line executes? (using breakpoints)

Sign in to comment.

Sign in to answer this question.

Products


Release

R2018a