Dimensions of arrays being concatenated are not consistent.

2 visualizaciones (últimos 30 días)
I have no idea why I am getting an error in the following code:
FluorDataInd = round(i/TimeFactor)+1
x=[ConcValues{1,1} ConcValues{1,2} ConcValues{1,3} ConcValues{1,4} ConcValues{1,5}]'; y=[FluorData{FluorDataInd,3}
FluorData{FluorDataInd,4} FluorData{FluorDataInd,5} FluorData{FluorDataInd,6} FluorData{FluorDataInd,7}]';
[cf G]=L4P(x,y)
The error I am getting is:
457 x=[ConcValues{1,1} ConcValues{1,2} ConcValues{1,3} ConcValues{1,4} ConcValues{1,5}]'; y=[FluorData{FluorDataInd,3}
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
So for the x = statement, all of the variables need to be values. For example, the following does not produce any errors"
x=[1E-07 1E-02 5E-13 1E-10 1E-04]'; y=[102.992 130.6 48.1917 51.083202 127.988]';
[cf G]=L4P(x,y)
FluorDataInd provides the row number for the table FluorData. So, I don't see what the problem is.

Respuesta aceptada

Stephen23
Stephen23 el 27 de Sept. de 2021
The problem is the line-break without any ellipses. But your code can be simplified anyway, removing that problem:
x = [ConcValues{1,1:5}].';
y = [FluorData{FluorDataInd,3:7}].';
See also:

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by