Dimensions of arrays being concatenated are not consistent.
1 次查看(过去 30 天)
显示 更早的评论
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.
0 个评论
采纳的回答
Stephen23
2021-9-27
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:
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Creating and Concatenating Matrices 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!