How do I calculate the proportion of positive slope, negativeslope, and zero slope for my data in Matlab? Also, would like tocalculate the length the curve is growing, decreasing, and issteady, and the time its in those phases in matlab.
My function has the variables T and Y and I would like this donein matlab.
My current logic to tackle this problem is to:
select the regions of the plot where diff(Y) is greater than 0and store those in an array called growing
select the regions of the plot where diff(Y) is less than 0 andstore those in an array called decreasing
select the regions of the plot where diff(Y) is equal to 0 andstore those in an array called steady
And somehow match up the time intervals for those portions andadd them up for each segment of growing, decreasing, andsteady.
Then I can do statistical analysis and plot each as a differentcolor.
However, I can not seem to get the code for any of those tasksto work. Please provide the code in matlab.
How do I calculate the proportion of positive slope, negative slope, and zero slope for my data in Matlab? Also, would l
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am