Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Plotting data with microsecond accuracy
Replies: 3   Last Post: Apr 17, 2013 10:05 AM

 Messages: [ Previous | Next ]
 Kevin Posts: 2 Registered: 4/16/13
Re: Plotting data with microsecond accuracy
Posted: Apr 17, 2013 3:47 AM

dpb <none@non.net> wrote in message <kkk2p7\$a73\$1@speranza.aioe.org>...
> On 4/16/2013 12:08 PM, Kevin wrote:
> > I am trying to plot voltage values that have been sampled at 50 us
> > intervals. Each of these samples have been timestamped so that they can
> > be compared with other measurements. I've converted the timestamps to
> > datenum values but when I use the PLOT function, the x-axis is scaled in
> > such a way that all of my data is compressed to the centre of the plot.
> > I have tried manipulating the axis using xlim and datetick but nothing
> > changes. What I really need to be able to is zoom in on specific areas
> > of the plot while safegaurding the timestamps and scaling the axis
> > accordingly. Any advice would be much appreciated.
> >

>
> If you're coding in the absolute clock time to the us the problem is
> that the resolution of DATENUM is being stretched to its limits. I just
> tried here and the best I can get w/ xlim on the x-axis w/ a current
> year datenum magnitude is roughly 10E-4 sec whereas the resolution of 1
> ms on a datenum is otoo 10E0-8. Thus, while I could get a wider
> vertical line than the default single pixel, it is still essentially a
> vertical line.
>
> If you need to also know the real time associated w/ that record I think
> you'll have to keep that separate of the actual time record--I'd
> probably just count the time series itself in us from wherever sample
> starts in the record and then if need to date it write that as a text
> string.
>
> --

Keeping the times as separate strings was one option I was looking into. However, everything I read online states that the resolution of DATENUM is 10 us, 5 times smaller than what I need. In addition, if I subtract two subsequent timestamps, I can retrieve the original 50 us period so MATLAB definitely has the precision stored somewhere. It just seems like the plotting function can't handle the precision. Is it possible that the plotting functions remove the necessary precision? I would think not but I'm open to any ideas at this point.

Date Subject Author
4/16/13 Kevin
4/16/13 dpb
4/17/13 Kevin
4/17/13 dpb