Error using vertcat Dimensions of matrices being concatenated are not consistent.
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Michael Gkouvakis
am 17 Mai 2019
Kommentiert: Michael Gkouvakis
am 3 Jun. 2019
I am using fsolve and to find the steady state values in a system of 35 equations with 35 unkowns and i am receiving the error message "Error using vertcat Dimensions of matrices being concatenated are not consistent" when checking if my code works.
Can you help?
Attached you may the code used.
PS. I am a new user in matlab so excuse my ignorance.
0 Kommentare
Akzeptierte Antwort
Guillaume
am 18 Mai 2019
At least, one of the expressions in your F does not return a scalar. To find which one, you will have to try each one individually. Give some dummy values to x (e.g: x = 1:35) and try each line on its own at the command line,
I've not looked beyound
-exp(w_p)+(1-alpha)*exp(y_e)/(exp(l_pd)*exp(x))
This lines give an error for row vectors x, since you're attempting to divide a scalar by exp(x) which is a row vector. If x is a column vector the division succeed but you'll get a vector in return so you'll certainly see a 'dimension of matrices being concatenated are not consistent' error. Clearly, that x is meant to be something else.
I've not looked past that you may have more typos.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Equation Solving finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!