Hello,
I am using xlsread (x=xlsread(filename,sheet,xlrange))
to obtain values for x from my excel file, x is a 27×1 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
Best Answer