While Loop help, homework, ADC readings
1 view (last 30 days)
David Hill on 4 Feb 2020
There are various ways to determine the start and stop indexes of the clock signal.
clock=clock(clock>4.9);%changes clock signal to 1's and 0's
a=find(clock);%finds indexes of 1's
b=find(diff(a)>1);%finds index of a at the end of the signal
There are other ways you can investigate, but you get the idea. Bottom line is that you will need to find the idexes of the start and stop of the clock high signal and then index into signal at those indexes to calculate the means.