Let's say I need to solve nonlinear equations below in app designer.
function F = root2d(x)
F(1) = 3*x(1)^2+5*x(2)^3-15;
F(2) = 4*x(1)^3-7*x(2)^2+18;
end
I can solve it in app designer if I use this function as an external function and call it form the file. But in my case I need to be able to change coefficents of x(1) and x(2) also. These coefficients can be entered by users of my app so I need to use this function as an internal function (private or public). As an internal function I cannot write a useful code. This is my first question in MATLAB central so it is possible that I cannot explain my problem well. I hope that it is clear. I need your helps.
Thank you already,

 채택된 답변

Matt J
Matt J 2019년 5월 23일
편집: Matt J 2019년 5월 23일

0 개 추천

Have your app code invoke fsolve as follows
fsolve(@(x)root2d(x,c) ,___________ )
where
function F = root2d(x,c)
F(1) = c(1)*x(1)^2+c(2)*x(2)^3-c(3);
F(2) = c(4)*x(1)^3-c(5)*x(2)^2+c(6);
end

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기

질문:

2019년 5월 23일

댓글:

2019년 5월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by