problem with Boolinger Band

5 次查看(过去 30 天)
Luca Re
Luca Re 2023-9-25
编辑: Voss 2023-9-25
>> Data=1:500;
>> bollinger(Data)
Error using bollinger
Expected Window size to be a scalar with value <= 1.

采纳的回答

Voss
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 个)

类别

Help CenterFile Exchange 中查找有关 Stochastic Differential Equation (SDE) Models 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by