fzero problem when doing integration using quadl.
Mostra commenti meno recenti
1. I am trying to do an integration using quadl, so I need to define an inline function first. But this inline function is somewhat complex. I need to use the function fzero to define it and this causes a lot of errors. I dont know how to fix it.
2. If there is no fzero, it would be very easy, I have to use fzero to find the value of cc and then to do integration. If anyone can help, thanks a lot.
dd=quadl(@kk,1,5);
function kk=kk(y)
aa=y.^2;
bb=@(w) w^5-2*w-4-aa;
cc=fzero(bb,3);
kk=cc+1;
The error is the following:
??? Operands to the and && operators must be convertible to logical scalar values.
Error in ==> fzero at 333 elseif ~isfinite(fx) ~isreal(fx)
Error in ==> kk at 4 cc=fzero(bb,3);
Error in ==> quadl at 70 y = feval(f,x,varargin{:}); y = y(:).';
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Choose a Solver in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!