Error using vertcat Dimensions of matrices being concatenated are not consistent.
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Guillaume
2019 年 5 月 18 日
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.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Equation Solving についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!