hello
i try to solve this equation for x :
%Fsolve solves for x==n_bar
%%
function equ=steady_fsolve_nbar_CFE(x,alpha,phi,sx,abbrev1_bar,yn,kappa,eta)
%x=x0;
equ=x-(kappa*(eta*(1-sx-abbrev1_bar/yn*1/x)/alpha+1-eta))^(-phi/(phi+1));
%%
%%warning message:
x=fsolve(steady_fsolve_nbar_CFE,x0)
Not enough input arguments.
Error in steady_fsolve_nbar_CFE (line 7)
equ=x-(kappa*(eta*(1-sx-abbrev1_bar/yn*1/x)/alpha+1-eta))^(-phi/(phi+1));

 채택된 답변

Star Strider
Star Strider 2021년 1월 27일

0 개 추천

It is necessary to supply values for all the arguments.
Try this:
x = fsolve(@(x)steady_fsolve_nbar_CFE(x,alpha,phi,sx,abbrev1_bar,yn,kappa,eta), x0)
with all the values except ‘x’ already present in your workspace.

댓글 수: 2

thank you SIr.
Star Strider
Star Strider 2021년 1월 27일
As always, my pleasure!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터 및 File Exchange에서 Optimization Toolbox에 대해 자세히 알아보기

태그

질문:

2021년 1월 27일

댓글:

2021년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by