필터 지우기
필터 지우기

How to ignore NaN values in price2ret

조회 수: 2 (최근 30일)
BdS
BdS 2020년 4월 15일
Hi,
Is there any efficient code to get from vector [99;NaN;100;102] the following result:
[NaN;NaN;0.01010101;0.02] using the formula price2ret
it means that for the second day there is no return as there is no price, but for the third day matlab ignores NaN (in the second day) and instead it takes the price form the first day (99).
thanks

답변 (0개)

카테고리

Help CenterFile Exchange에서 GPU Computing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by