Error using vertcat Dimensions of matrices being concatenated are not consistent.
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Michael Gkouvakis
il 17 Mag 2019
Commentato: Michael Gkouvakis
il 3 Giu 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 Commenti
Risposta accettata
Guillaume
il 18 Mag 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.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Equation Solving in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!