
Re: Pairing two different values on one plot
Posted:
Apr 15, 2013 3:40 AM


Am 15.04.2013 08:44, schrieb PK: >> > >> > I have used >> > plot (Data, Timestamp); >> > but the output is awefuly different than ploting Data itself. >> > Please help. >> > >> > 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.
plot(x,y)... this leads usually to strange looking graphs if a) x is not sorted b) same xvalues for multiple yvalues c) combination of a and b
one thing you could do is: plot(x,y,'*')
this just sets markers instead of potentially confusing lines.
or
[x_sorted,x_idx]=sort(x); plot(x_sorted,y(x_idx))
this leads to ascending xvalues and thus potentially less confusing lines (in case of a).
As your plot command uses arguments in different order (y,x) you work possibly not with the matlab default plot command and thus nobody can solve this part of your problem.
Lothar

