help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plot


From: Thomas D. Dean
Subject: Re: Plot
Date: Thu, 30 Mar 2017 20:46:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 03/30/2017 06:21 PM, Juan Pablo Carbajal wrote:
On Fri, Mar 31, 2017 at 2:30 AM, Thomas D. Dean <address@hidden> wrote:
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;
## if I plot time vs bmp, I get all the bmp values in one vertical
## line with a line connecting to the next set 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);

I am not sure what you need, but
t1 has length 1400, t2 has length 1520; bmp1 and bmop2 has those
lengths respectively with values between 90 and 100, and 93 and 103.
Repeated 29 times. So:
n1 = 1400;
n2 = 1520;
B = (1+rand (29*(n1+n2),1))*10 + repmat ([80*ones(n1,1); 83*ones(n2,1)],29,1);
# now I create a linear timestamp
T = (1:29*(n1+n2)).';
plot (T,B)

is this what you want?


From my simulation above, both T and B have size (84680,1).

I am reading the 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.

I was offering a simulation to generate a similar grouping of data points.

I want to plot B, but, keep the correlation and x-axis labels with the correct timestamp from T.

Tom Dean





reply via email to

[Prev in Thread] Current Thread [Next in Thread]