Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

save timeseries to file

10 views
Skip to first unread message

Bastian

unread,
Feb 9, 2010, 1:40:21 PM2/9/10
to
I would like to save timeseries objects to a file and then subsequently load them back into the workspace as timeseries. I am trying to do this to avoid having to recreate the timeseries each time I want to use them. Can this be done?

Oleg Komarov

unread,
Feb 9, 2010, 1:59:05 PM2/9/10
to
"Bastian " <bastian...@trentu.removethistext.ca> wrote in message <hksa6l$gbf$1...@fred.mathworks.com>...

> I would like to save timeseries objects to a file and then subsequently load them back into the workspace as timeseries. I am trying to do this to avoid having to recreate the timeseries each time I want to use them. Can this be done?

help save

Oleg

Bastian

unread,
Feb 9, 2010, 2:53:03 PM2/9/10
to
"Oleg Komarov" <oleg.komaro...@hotmail.it> wrote in message <hksb9p$pui$1...@fred.mathworks.com>...

I wish it was that simlpe. I am talking about a MATLAB timeseries object not just any old variable in the workspace (check it out: help timeseries). Any other ideas?

ade77

unread,
Feb 9, 2010, 3:08:04 PM2/9/10
to
"Bastian " <bastian...@trentu.removethistext.ca> wrote in message <hkseev$lb1$1...@fred.mathworks.com>...

It is basically the same concept.
If your timeseries object is named 'my_ts'.
save('myfile','my_ts');
this will save the timeseries object 'my_ts' inside myfile.mat in the default directory.
Hence,
save('myfile','my_ts');
load myfile % will bring back your timeseries 'my_ts', in the workspace

Bastian

unread,
Feb 9, 2010, 4:15:22 PM2/9/10
to
"ade77 " <ade...@gmail.com> wrote in message <hksfb4$iq2$1...@fred.mathworks.com>...

Thanks ade77. That works. I appreciate you patiently pointing out the obvious need for putting the single quotes around the timeseries name... I read the help on "save" (as suggested by Oleg) but for some reason I missed this obvious fact. I am always thrown off by how MATLAB requires strings for arguments for some functions but not others.

Oleg Komarov

unread,
Feb 9, 2010, 7:15:23 PM2/9/10
to
"Bastian " <bastian...@trentu.removethistext.ca> wrote in message <hksj9a$36m$1...@fred.mathworks.com>...

I do completely agree with you.

Oleg

0 new messages