problem with Boolinger Band
6 ビュー (過去 30 日間)
古いコメントを表示
>> Data=1:500;
>> bollinger(Data)
Error using bollinger
Expected Window size to be a scalar with value <= 1.
0 件のコメント
採用された回答
Voss
2023 年 9 月 25 日
編集済み: Voss
2023 年 9 月 25 日
Note the documentation of bollinger input argument Data:
Data for market prices, specified as a matrix, table, or timetable. For matrix input, Data must be column-oriented.
This means that bollinger is expecting one or more columns of data. You've given a row vector, so transpose (.') it:
Data=1:500;
[middle,upper,lower] = bollinger(Data.');
plot(Data)
hold on
plot(middle,'--')
plot(upper,'--')
plot(lower,'--')
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Oceanography and Hydrology についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!