Thanks Walter, just another question about fzero. I am trying to find the zero of the following inline function:
fun=inline('-Pt1+y+(zcb+(rate*tau2*y))')
where Pt1=0.999970474084335 zcb=0.005646500819616 rate=0.0056460 tau2=0.99722222222222
yres=fzero(@(y) fun(Pt1,tau2,rate,zcb,y),[0.2,1.0])
yres=0.994292181677045
but when I go to check the inline functionsubstituting the value of y with yres I get
val=-Pt1+yres+(zcb+(rate*tau2*yres))
val=0.005566388254360
while I was expecting a value quite close to 0
Any clue?
Thanks Paolo