필터 지우기
필터 지우기

How can I transfer the variable to the equations to be solved when using fsolve function in simulink

조회 수: 1 (최근 30일)
Hi
I am trying to integrate fsolve function into simulink by using code.extrinsic. The equations contain a variable, which is calculated by other blocks,need to be transfer to the equation. Function handles were not supported in Embedded MATLAB Function blocks. How can I transfer the variable to the equations to be solved?
function x=main(w)
x0=[-5;-5];
[x,fval]=fsolve(@objfun1,x0,[ ],w)
function f=objfun1(x,w)
f=[2*log(x(1))-x(2)-sin(x(1))+w;
exp(x(1))+x(2)-3*cos(x(2))+w];
where w is the variable need to be transfered from other block
can anyone help me? best regards

답변 (0개)

카테고리

Help CenterFile Exchange에서 General Applications에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by