The Math Forum

Search All of the Math Forum:

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

Math Forum » Discussions » Software » comp.soft-sys.matlab

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

Topic: Pairing two different values on one plot
Replies: 19   Last Post: Apr 18, 2013 2:44 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 9,850
Registered: 6/7/07
Re: Pairing two different values on one plot
Posted: Apr 15, 2013 2:33 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 4/15/2013 1:44 AM, PK wrote:
> "Nasser M. Abbasi" wrote in message <kkg6na$kc5$>...
>> On 4/15/2013 1:09 AM, PK wrote:

>> > Timestamp=
>> > 201203291200000
>> > 201203291215000
>> > 201203291230000

>> > 201203291400000
>> > 201203291415000
>> >


>> > Now I want to plot Timestamp on x-axis and Data on y-axis so that I
>> can find
>> >the value of data at particular time.
>> >
>> > I have used
>> > plot (Data, Timestamp);
>> > but the output is awefuly different than ploting Data itself.


>> Should not this be:
>> plot (Timestamp, Data );
>> normally one puts time on the x-axis, as things normally are function
>> of time? When you do plot(Data), then Matlab puts i=1:N on the
>> axis by default, where N is length of Data.


> as plot(A,B); plots A on y-axis and B on x-axis, plot (Timestamp, Data )
> does not fix the issue. only swaps the axis.

To see at least part of the problem and why you need datenums if want
other than ordinal x axis values, try


at the command line and observe what you get...


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.