I am fairly new to MATLAB and struggling with a question and not sure where to begin, so I apologize for not having sample code here to start with.
There is a 7524 x 3 matrix m file attached which has columns of: 1) MATLAB date; 2) an asset value; and 3) an asset drawdown stream. Each row is a trading day.
I am trying to do the following:
Loop through each row and find ranges of values between zeros in column 3, given a certain threshold. For example, if the threshold is -.05, I would like to find and assign a variable to this range between zeros (new highs for the asset in column 3). If, between zeros (new highs), there is not a value <= -.05, disregard and move to the next. I would like to assign a unique variable name for all instances that meet this criteria (i.e. instance 1, instance 2, etc...) and then save to disk.
I am struggling thinking through how to accomplish this, so any help would be very appreciated!
Please let me know if further clarification is needed.