Error using vertcat. Dimensions of arrays being concatenated are not consistent.

1 次查看(过去 30 天)
Hello,
I hope you are doing well.
I am working on a school project and I have an error that I unfortunately can't manage to understand. I am doing a mathematical modeling project where we have to use Newton's method on equations systems (in case this helps).
Here is what my console displays:
Error using vertcat
Dimensions of arrays being concatenated are not consistent.
Error in projet>@(x,y)[4*x^3,+12*y-8*x*(y^4);exp(-x^3+(y^2)/(x^2))-exp(5)] (line 51)
system2 = @(x,y)[4*x^3 +12*y - 8*x*(y^4); exp(-x^3 + (y^2)/(x^2)) - exp(5)];
Error in projet (line 56)
solution = solution(x,y)-(jacobian_system2_inverse(x,y))*(system2(x,y));
What confuses me is that the first half of the project works just fine. The Newton method seems well applied as the results given back are good.
But then, the second half, which is exactly the same thing but with different equations in it, suddenly returns an error.
You can find my whole work in the linked document.
Thank you in advance for your help,
Chloé

采纳的回答

darova
darova 2020-5-29
Make sure that all your spaces correct
Here is example
[1 -1; 1 2] % ok
[1 - 1; 1 2] % error

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Multidimensional Arrays 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by