Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

cell/vector operation to replace excel operation

조회 수: 2 (최근 30일)
liu James
liu James 2016년 11월 24일
마감: MATLAB Answer Bot 2021년 8월 20일
I'm trying to convert simple math operations that can be done in excel into matlab language/script. Basically I'm trying to perform a moving average and need to loop N back into the equation while I calculate each N with the according date associated it. Where TR is the true range for that date. N1=sum(h4:h23)/20,N2=(19*N1 +TR2)/20,N3=(19*N2 +TR3)/20,N4=(19*N3 +TR4)/20.....where TR1=max(E4:G4), TR2=max(E5:G5)....N:end is basically a moving average of 20 days with formula of N=(19*previous N + TR)/20.

답변 (1개)

Image Analyst
Image Analyst 2016년 11월 24일
Try movmean().

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by