Search code examples
arraysmatlabmatrixconcatenation

Error using horzcat Dimensions of arrays being concatenated are not consistent. Matlab


I am geting the Error using horzcat Dimensions of arrays being concatenated are not consistent.

I am trying to do the following:

Y = [single(time)' Bmag' Br' Bt' Bn']

However, my arrays are of the same size:

enter image description here


Solution

  • Your time array is 1x3060 instead of 1x3600.