[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Plot
From: |
Thomas D. Dean |
Subject: |
Re: Plot |
Date: |
Fri, 31 Mar 2017 20:41:29 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 |
I will try again.
I exercise for twenty minutes, two times per day, with the heart rate
monitor generating a reading every second. If I start at 10AM, I have
1200 samples with time stamps of 10:00:00. 10:00:01, etc. If I start
again at 2PM, I have 1200 samples with time stamps of 14:00:00,
14:00:01, etc. So, my data file has two columns, a time stamp and a
heart rate. But the data is not evenly spaced in time.
I am reading this data from a file that changes in size, growing some
2600 lines per day. The file currently has 84000+ entries of a time
stamp and a heart beat rate, I called bmp from the mfg's android app.
Here is a function that generates data that has similar clumping. This
is not part of my problem, just a function that will generate data with
similar grouping.
function [] = make_file()
T=[]; B=[];
for day=1:29
t1=day+(10+([1:1400]/60/60))/24;
t2=day+(16+([1:1520]/60/60))/24;
bmp1=(1+rand(size(t1)))*10+80;
bmp2=(1+rand(size(t2)))*10+83;
T=[T;t1';t2'];
B=[B;bmp1';bmp2'];
endfor;
fd = fopen("xx.dat","w");
fprintf(fd, "%f %d\n",[T,B]');
fclose(fd);
endfunction;
make_file();
[A,B] = textread ("xx.dat", "%f %d");
## if I plot time vs bmp, I get one group of bmp values in one vertical
## line with a line connecting to the next group of bmp values.
plot(T,B);
## plot with points demonstrates this:
plot(T,B,'.');
## I want the plot to look something like this:
plot(B);
Tom Dean
- RE: Hash function doesn't work, (continued)
- RE: Hash function doesn't work, Allen.Windhorn, 2017/03/31
- Re: Hash function doesn't work, Thomas D. Dean, 2017/03/30
- Re: Hash function doesn't work, Tatsuro MATSUOKA, 2017/03/30
- Re: Hash function doesn't work, evansste, 2017/03/30
- Re: Hash function doesn't work, Tatsuro MATSUOKA, 2017/03/30
- Plot, Thomas D. Dean, 2017/03/30
- Re: Plot, Juan Pablo Carbajal, 2017/03/30
- Re: Plot, Thomas D. Dean, 2017/03/30
- Re: Plot, Kire Pudsje, 2017/03/31
- Re: Plot, Juan Pablo Carbajal, 2017/03/31
- Re: Plot,
Thomas D. Dean <=
- Re: Plot, Thomas D. Dean, 2017/03/31
Re: Hash function doesn't work, Francesco Potortì, 2017/03/31
RE: Hash function doesn't work, Allen.Windhorn, 2017/03/30