From: Smitha Anjali on 16 Mar 2010 21:45 I am super new to MATLAB. I have huge chunks of data and I would like to to find out the amount of time a particular data value is above or below 0 . I want to count the total time when my value on the y axis is above or below zero as percentage of total time. Even a histogram showing the amount of time the data value is non zero would help.
From: Walter Roberson on 16 Mar 2010 21:54 Smitha Anjali wrote: > I am super new to MATLAB. I have huge chunks of data and I would like to > to find out the amount of time a particular data value is above or below > 0 . I want to count the total time when my value on the y axis is above > or below zero as percentage of total time. > Even a histogram showing the amount of time the data value is non zero > would help. NegativePercentage = sum(y(:) < 0) / numel(y) * 100
|
Pages: 1 Prev: Adapting histfit.m to tfit.m Next: Interfacing MATLAB with BASIC Stamp 2 |