PK
Posts:
7
Registered:
4/15/13


Re: Pairing two different values on one plot
Posted:
Apr 15, 2013 2:44 AM


"Nasser M. Abbasi" wrote in message <kkg6na$kc5$1@speranza.aioe.org>... > On 4/15/2013 1:09 AM, PK wrote: > > Hi > > If I have two sets of data say > > > > > > Timestamp= > > 201203291200000 > > 201203291215000 > > 201203291230000 > > 201203291245000 > > 201203291300000 > > 201203291315000 > > 201203291330000 > > 201203291345000 > > 201203291400000 > > 201203291415000 > > > > and > > Data = > > 5 > > 45 > > 70 > > 99 > > 80 > > > > length of both A and B is same say 700. Basically first value of Timestamp corresponds > >to first value of Data. > > Now I want to plot Timestamp on xaxis and Data on yaxis 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. > > Please help. > > > > > Should not this be: > > plot (Timestamp, Data ); > > normally one puts time on the xaxis, 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. > > Nasser > hi as plot(A,B); plots A on yaxis and B on xaxis, plot (Timestamp, Data ) does not fix the issue. only swaps the axis.

