Error using vertcat: dimension of arrays being concenated are not consistent
Ältere Kommentare anzeigen
Hello,
I am using xlsread (x=xlsread(filename,sheet,xlrange))
to obtain values for x from my excel file, x is a 27x1 double.
(x=
1.01
1.05
0.004
0.65
etc...)
Then I have matrix A (nx27). I try to call some of the values for A from x, for example(i present just a few rows for the idea):
A= [1 -1 0 1 1 -1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0; % just some random row
0 0 0 1 -1 0 x(20) 1 0 (x(21)-x(23)) 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
A is a jacobian matrix I use , so some elements for A are calculation operations from partial differentials.
When i use this, it gives me the error using vertcat: dimensions of arrays being concatenated are not consistent
The error points to the line where the term 'A=' is. Does it have something to do with it? Anyways, i didnt find an answer after searching for 5 hours from here and trying few things.
Any idea why this happens? is it something with xlsread? I am completely lost with this. Should i use something different for obtaining values for x from excel?
BR,
Jouni
2 Kommentare
Walter Roberson
am 14 Mai 2019
We need the real code that constructs A
Jouni Salovaara
am 14 Mai 2019
Bearbeitet: Jouni Salovaara
am 14 Mai 2019
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Logical finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!