Effacer les filtres
Effacer les filtres

Plotting data

2 vues (au cours des 30 derniers jours)
shaz
shaz le 2 Avr 2012
Hi
i have data called x(26*1 cell) & y(26*1 cell)
sometimes my x & y data will be timestamp
Not able to plot
using plot(x,y) getting error
??? Error using ==> plot Not enough input arguments.
Thanks in advance

Réponse acceptée

Rick Rosson
Rick Rosson le 2 Avr 2012
>> doc cell2mat
  1 commentaire
shaz
shaz le 2 Avr 2012
i have x -axis in 03-Apr-2012 12:25:00 (Timestamp format) & y-axis in 10,20 .
cell2mat works for y-axis but for X-axis??

Connectez-vous pour commenter.

Plus de réponses (1)

Thomas
Thomas le 2 Avr 2012
try
x_new=datenum(x,'dd-mmm-yyyy HH:MM:SS'); % xaxis time stamp format
y=cell2mat(y) % y axis
plot(x_new,y);
hold on
datetick('x','dd-mmm-yyyy HH:MM:SS') % to show the date time in graph

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by