Filter löschen
Filter löschen

problem with Boolinger Band

5 Ansichten (letzte 30 Tage)
Luca Re
Luca Re am 25 Sep. 2023
Bearbeitet: Voss am 25 Sep. 2023
>> Data=1:500;
>> bollinger(Data)
Error using bollinger
Expected Window size to be a scalar with value <= 1.

Akzeptierte Antwort

Voss
Voss am 25 Sep. 2023
Bearbeitet: Voss am 25 Sep. 2023
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,'--')

Weitere Antworten (0)

Kategorien

Mehr zu Stochastic Differential Equation (SDE) Models finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by