calculate boolinger bandwidth using matlab function

3 ビュー (過去 30 日間)
Luca Re
Luca Re 2023 年 11 月 5 日
コメント済み: Star Strider 2023 年 11 月 6 日
hi..I had a problem relating to the calculation of the boolinger band Using the matlab function (bollinger) is the result equal to the calculation of the standard deviation of its n-period mean? Unfortunately I can't do this test because I need the stdev2 function which is a paid package
  2 件のコメント
Walter Roberson
Walter Roberson 2023 年 11 月 5 日
Which software package is stdev2 part of? It does not appear to be a Mathworks function
Luca Re
Luca Re 2023 年 11 月 5 日

サインインしてコメントする。

採用された回答

Star Strider
Star Strider 2023 年 11 月 5 日
編集済み: Star Strider 2023 年 11 月 5 日
The std2 function takes the standard deviation of all the elements in an array (it only has one argument, that being the entire array). You might be able to create your own version of it with:
std2 = @(A) std(A,[],'all');
This has been possible since R2018b.
EDIT —
Since the bollinger function has to have access to std2, use:
function sda = std2(A)
sda = std(A,[],'all');
end
instead, and store it as std2.m on your MATLAB search path where bollinger can find it.
.
  10 件のコメント
Luca Re
Luca Re 2023 年 11 月 6 日
the original...std2 requires image processing toolbox
Star Strider
Star Strider 2023 年 11 月 6 日
As I mentioned originally, you need to save this function:
function sda = std2(A)
sda = std(A,[],'all');
end
as std2.m on your MATLAB search path so that all calls to it can find it.

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by