plot with dates on matlab

2 次查看(过去 30 天)
Hi All, I have some historical time series prices for some assets in a matrix of size 295x34. (Matrix called Absy)
Also I have the corresponding 295 dates in another matrix (295x1) called dates. The dates are in the format of 20060606 20060613 etc (weekly).
I want to plot Absy but with the x axis being the corresponding dates.
When I do plot (dates,Absy) I get a wrong graph. Could someone help me.

采纳的回答

the cyclist
the cyclist 2012-7-16
One way:
Convert to a MATLAB serial date first, using datenum()
d = datenum('20060606','yyyymmdd')
then plot, and use the datetick() function.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Financial Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by