fsolve problem :Not enough input arguments.

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));

 采纳的回答

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.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Optimization Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by