Error "First input argument must be a function handle." function used fzero Please help to resolve the issue. Thanks
Show older comments
LHS = n(1) * (hf_0(1) + dh_CH4 ) + n(2) * (hf_0(2) + dh_O2); % I holds a double
%function [T_ad] = usolver(dh_CH4,dh_O2,n,hf_0,dh_CO2,dh_H2O,epsilon)
n = [1,2,1,2];
hf_0 = [-74873 , 0, -39352, -241826];
f = @(x) (- n(3) * (hf_0(3) + dh_CO2(x)) - n(4) * (hf_0(4) + dh_H2O(x))) + LHS ; % dh_CO2 & dh_H2O are functions in x
fzero(f,1000)
Error using fzero>localFirstFcnEvalError
FZERO cannot continue because user-supplied function_handle ==> @(x)(-n(3)*(hf_0(3)+dh_CO2(x))-n(4)*(hf_0(4)+dh_H2O(x))) failed with the error below.
First input argument must be a function handle.
Accepted Answer
More Answers (0)
Categories
Find more on Test and Measurement in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!