how can i solve the error in thi code

2 views (last 30 days)
Nimrod Paul
Nimrod Paul on 6 Mar 2020
Commented: darova on 6 Mar 2020
Error using fzero (line 246)
FZERO cannot continue because user-supplied function_handle ==> @(x)utility_UE(x,ii,pp) failed with the error below.
Too many input arguments.
Error in take2_algorithm (line 23)
soln(i) = fzero(@(x)utility_UE(x, ii, pp), [.002 2000]);
  7 Comments
Nimrod Paul
Nimrod Paul on 6 Mar 2020
function [p] = utility_UE(w)
global p_old R
R = 200;
p = sum(w)./R;
end
darova
darova on 6 Mar 2020
Do you see anything strange?

Sign in to comment.

Answers (0)

Categories

Find more on Variables in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!