Info

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

change variable when difference between 2 rows

조회 수: 1 (최근 30일)
James Upton
James Upton 2019년 7월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a variable matrix, one column is datetime, I want to change a variable called lastdayclose to the previous days close price.
eg: matrix has 2 columns
datetime
close price
variable lastdaysclose:
so I want to loop through the array and pickup the close of yesterday and assign it to the variable lastdaysclose each time there is a new day:
  댓글 수: 1
dpb
dpb 2019년 7월 16일
As usual, it would be far simpler to have a small(ish) set of your data to work with and an example of what you expect the result to be ... here, it isn't clear what to do for other than the first element of the new day and where the result is supposed to go and, for sure, which is the input vis a vis the output.

답변 (0개)

태그

Community Treasure Hunt

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

Start Hunting!

Translated by