problem with Boolinger Band
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
>> Data=1:500;
>> bollinger(Data)
Error using bollinger
Expected Window size to be a scalar with value <= 1.
0 commentaires
Réponse acceptée
Voss
le 25 Sep 2023
Modifié(e) : Voss
le 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,'--')
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Stochastic Differential Equation (SDE) Models dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!