필터 지우기
필터 지우기

Data

조회 수: 2 (최근 30일)
Mate 2u
Mate 2u 2012년 5월 4일
Hi there, I have a 6 million x 1 array of prices. I want to change it so that it is +1 if P+1 > P, -1 if P-1 <P and 0 if P+1=P
  댓글 수: 2
Mate 2u
Mate 2u 2012년 5월 4일
Additionally would prefer if algorithm is quick.
Daniel Shub
Daniel Shub 2012년 5월 4일
What happens if P < P+1 and P > P-1?

댓글을 달려면 로그인하십시오.

채택된 답변

Andrei Bobrov
Andrei Bobrov 2012년 5월 4일
  댓글 수: 3
Andrei Bobrov
Andrei Bobrov 2012년 5월 4일
hence P(ii) == P(ii + 1)
Daniel Shub
Daniel Shub 2012년 5월 4일
@Mate, the documentation for sign clearly states that sign(0) is 0.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Language Fundamentals에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by