How to calculate price weighted function?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Mahmoud Ashraf
2022 年 4 月 28 日
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
参考
カテゴリ
Help Center および File Exchange で Financial Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!