How to calculate price weighted function?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I'm trying to calculate the following function in Matlab. This is what I have tried so far but it gives me NaN. Can someone help?


0 commentaires
Réponses (1)
Mahmoud Ashraf
le 28 Avr 2022
avg=rand(1,505);
sum=0;
for j=1:505
sum=sum+avg(1,j);
end
for m=1:505
pweight(1,m)=avg(1,j)/sum;
end
Voir également
Catégories
En savoir plus sur Financial Toolbox 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!