finding the breakeven point

6 次查看(过去 30 天)
joseph Frank
joseph Frank 2013-4-19
Hi,
I have the following equation:
nanmean(R(x0+1))-(fm1.*BHR)+(ntrades/2*n)*log((1-c)./log(1+c));
I know every parameter except c, which is a breakeven point that I want to compute. i.e. I want the value of c that gives: nanmean(R(x0+1))-(fm1.*BHR)+(ntrades/2*n)*log((1-c)./log(1+c))=0;
does any one know how to do this using matlab?

回答(1 个)

bym
bym 2013-4-19
Are you sure your equation is right? Anyway here is an example with a modified equation:
f = @(c) log((c-1)./log(1+c))
fzero(f,2)
ans =
2.1462

类别

Help CenterFile Exchange 中查找有关 Interpolation 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by