MATLAB: Error using vertcat, “Dimensions of matrices being concatenated are not consistent.”

consistentdimensionsmatricesnottablesvertcat

I uploaded my code, I'm doing a practice exam and I need to make a table for all the different swing parameters because I have various equations that need to output an answer for each parameter. However, every time I make this table, I get an error. I have no idea what I am doing wrong.

Best Answer

I have no idea what I am doing wrong.
Well, to give you an idea, the error comes from doing things like this,
>> [rand(4);rand(1,3)]
Error using vertcat
Dimensions of matrices being concatenated are not consistent.
or like this,
>> [1,2,3 ; 4,5,6,7]
Dimensions of matrices being concatenated are not consistent.
In other words, you are trying to vertically stack matrices with different numbers of columns. The error message will give you the location in the code where this is occurring, so it should be very easy to find.