write an equation from algorithm

hello
i have algorithm and i need help to write the equation for it
this is algorithm
thank you....

回答 (2 件)

Walter Roberson
Walter Roberson 2015 年 9 月 28 日

0 投票

In general, equations derived from programs need to be written in something like Lambda Calculus. You might be able to work out a piecewise() representation that you could then convert to a messy system involving a bunch of Heaviside.
Thorsten
Thorsten 2015 年 9 月 28 日
編集済み: Thorsten 2015 年 9 月 28 日

0 投票

It interpret your question such that you do not ask for the equation, but for the Matlab implementation.
It's pretty straightforward to code this into Matlab. This should get you started:
function y = approxphi(x)
v = [1.25 ... ]% add all the v's here as a vector
j = floor(min([abs(x)+0.5, 14]));
z = j; h = abs(x) - z; a = v(j+1);
b = ...
c = log(sqrt(2*pi))
for i = 2:2:24-j
end

カテゴリ

ヘルプ センター および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

質問済み:

2015 年 9 月 28 日

編集済み:

2015 年 9 月 28 日

Community Treasure Hunt

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

Start Hunting!

Translated by