K>> myfts = fints((datenum('07/01/98'):datenum('07/01/98')+4)',...
[1234.56; 2345.61; 3456.12; 4561.23; 5612.34], [], 'Daily',...
'Data Reference');
K>>
K>>
K>> myfts
myfts =
desc: Data Reference
freq: Daily (1)
'dates: (5)' 'series1: (5)'
'01-Jul-1998' [ 1.2346e+003]
'02-Jul-1998' [ 2.3456e+003]
'03-Jul-1998' [ 3.4561e+003]
'04-Jul-1998' [ 4.5612e+003]
'05-Jul-1998' [ 5.6123e+003]
K>> myfts({'01-Jul-1998', '02-Jul-1998'})
??? Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'cell'.
K>> myfts(['01-Jul-1998', '02-Jul-1998'])
??? Index exceeds matrix dimensions.
K>> myfts(['01-Jul-1998'; '02-Jul-1998'])
??? Index exceeds matrix dimensions.
K>> myfts({'01-Jul-1998'; '02-Jul-1998'})
??? Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'cell'.
K>> myfts({'07/01/1998'})
??? Error using ==> subsindex
Function 'subsindex' is not defined for values of class 'cell'.
K>> myfts('07/01/1998')
??? Index exceeds matrix dimensions.
K>> myfts('07/01/98')
??? Index exceeds matrix dimensions.
-----------------
How do I index a bunch of dates all at once from a time series object?
Thanks!
|
|
0
|
|
|
|
Reply
|
lunamoonmoon (258)
|
2/11/2010 5:19:14 PM |
|
Luna Moon <lunamoonmoon@gmail.com> wrote in message <6bc87d6c-16c0-4aa8-8c4a-d94ea38079c0@z1g2000vbo.googlegroups.com>...
> K>> myfts = fints((datenum('07/01/98'):datenum('07/01/98')+4)',...
> [1234.56; 2345.61; 3456.12; 4561.23; 5612.34], [], 'Daily',...
> 'Data Reference');
> K>>
> K>>
> K>> myfts
>
> myfts =
>
> desc: Data Reference
> freq: Daily (1)
>
> 'dates: (5)' 'series1: (5)'
> '01-Jul-1998' [ 1.2346e+003]
> '02-Jul-1998' [ 2.3456e+003]
> '03-Jul-1998' [ 3.4561e+003]
> '04-Jul-1998' [ 4.5612e+003]
> '05-Jul-1998' [ 5.6123e+003]
>
> K>> myfts({'01-Jul-1998', '02-Jul-1998'})
> ??? Error using ==> subsindex
> Function 'subsindex' is not defined for values of class 'cell'.
>
> K>> myfts(['01-Jul-1998', '02-Jul-1998'])
> ??? Index exceeds matrix dimensions.
>
> K>> myfts(['01-Jul-1998'; '02-Jul-1998'])
> ??? Index exceeds matrix dimensions.
>
> K>> myfts({'01-Jul-1998'; '02-Jul-1998'})
> ??? Error using ==> subsindex
> Function 'subsindex' is not defined for values of class 'cell'.
>
> K>> myfts({'07/01/1998'})
> ??? Error using ==> subsindex
> Function 'subsindex' is not defined for values of class 'cell'.
>
> K>> myfts('07/01/1998')
> ??? Index exceeds matrix dimensions.
>
> K>> myfts('07/01/98')
> ??? Index exceeds matrix dimensions.
>
> -----------------
>
> How do I index a bunch of dates all at once from a time series object?
>
> Thanks!
>> myfts(1:2)
ans =
desc: Data Reference
freq: Daily (1)
'dates: (2)' 'series1: (2)'
'01-Jul-1998' [ 1.2346e+003]
'02-Jul-1998' [ 2.3456e+003]
>> myfts.dates
ans =
729937
729938
729939
729940
729941
>> myfts.dates(2:4)
ans =
729938
729939
729940
|
|
0
|
|
|
|
Reply
|
donn.shull.no_spam (336)
|
2/11/2010 5:38:04 PM
|
|
On Feb 11, 12:38=A0pm, "Donn Shull" <donn.shull.no_s...@aetoolbox.com>
wrote:
> Luna Moon <lunamoonm...@gmail.com> wrote in message <6bc87d6c-16c0-4aa8-8=
c4a-d94ea3807...@z1g2000vbo.googlegroups.com>...
> > K>> myfts =3D fints((datenum('07/01/98'):datenum('07/01/98')+4)',...
> > [1234.56; 2345.61; 3456.12; 4561.23; 5612.34], [], 'Daily',...
> > 'Data Reference');
> > K>>
> > K>>
> > K>> myfts
>
> > myfts =3D
>
> > =A0 =A0 desc: =A0Data Reference
> > =A0 =A0 freq: =A0Daily (1)
>
> > =A0 =A0 'dates: =A0(5)' =A0 =A0'series1: =A0(5)'
> > =A0 =A0 '01-Jul-1998' =A0 =A0[ =A01.2346e+003]
> > =A0 =A0 '02-Jul-1998' =A0 =A0[ =A02.3456e+003]
> > =A0 =A0 '03-Jul-1998' =A0 =A0[ =A03.4561e+003]
> > =A0 =A0 '04-Jul-1998' =A0 =A0[ =A04.5612e+003]
> > =A0 =A0 '05-Jul-1998' =A0 =A0[ =A05.6123e+003]
>
> > K>> myfts({'01-Jul-1998', '02-Jul-1998'})
> > ??? Error using =3D=3D> subsindex
> > Function 'subsindex' is not defined for values of class 'cell'.
>
> > K>> myfts(['01-Jul-1998', '02-Jul-1998'])
> > ??? Index exceeds matrix dimensions.
>
> > K>> myfts(['01-Jul-1998'; '02-Jul-1998'])
> > ??? Index exceeds matrix dimensions.
>
> > K>> myfts({'01-Jul-1998'; '02-Jul-1998'})
> > ??? Error using =3D=3D> subsindex
> > Function 'subsindex' is not defined for values of class 'cell'.
>
> > K>> myfts({'07/01/1998'})
> > ??? Error using =3D=3D> subsindex
> > Function 'subsindex' is not defined for values of class 'cell'.
>
> > K>> myfts('07/01/1998')
> > ??? Index exceeds matrix dimensions.
>
> > K>> myfts('07/01/98')
> > ??? Index exceeds matrix dimensions.
>
> > -----------------
>
> > How do I index a bunch of dates all at once from a time series object?
>
> > Thanks!
> >> myfts(1:2)
>
> ans =3D
>
> =A0 =A0 desc: =A0Data Reference
> =A0 =A0 freq: =A0Daily (1)
>
> =A0 =A0 'dates: =A0(2)' =A0 =A0'series1: =A0(2)'
> =A0 =A0 '01-Jul-1998' =A0 =A0[ =A01.2346e+003]
> =A0 =A0 '02-Jul-1998' =A0 =A0[ =A02.3456e+003]
>
> >> myfts.dates
>
> ans =3D
>
> =A0 =A0 =A0 729937
> =A0 =A0 =A0 729938
> =A0 =A0 =A0 729939
> =A0 =A0 =A0 729940
> =A0 =A0 =A0 729941
>
> >> myfts.dates(2:4)
>
> ans =3D
>
> =A0 =A0 =A0 729938
> =A0 =A0 =A0 729939
> =A0 =A0 =A0 729940- Hide quoted text -
>
> - Show quoted text -
No, I have to use either datenumbers or datestrings to index the time
series object, I don't want to use something like (2:4), that's not
convenient;
I would like to find a way to index the time series arbitrarily by
date string and/or date numbers...
Thanks!
|
|
0
|
|
|
|
Reply
|
lunamoonmoon (258)
|
2/11/2010 6:09:33 PM
|
|
On Feb 11, 1:09=A0pm, Luna Moon <lunamoonm...@gmail.com> wrote:
> On Feb 11, 12:38=A0pm, "Donn Shull" <donn.shull.no_s...@aetoolbox.com>
> wrote:
>
>
>
>
>
> > Luna Moon <lunamoonm...@gmail.com> wrote in message <6bc87d6c-16c0-4aa8=
-8c4a-d94ea3807...@z1g2000vbo.googlegroups.com>...
> > > K>> myfts =3D fints((datenum('07/01/98'):datenum('07/01/98')+4)',...
> > > [1234.56; 2345.61; 3456.12; 4561.23; 5612.34], [], 'Daily',...
> > > 'Data Reference');
> > > K>>
> > > K>>
> > > K>> myfts
>
> > > myfts =3D
>
> > > =A0 =A0 desc: =A0Data Reference
> > > =A0 =A0 freq: =A0Daily (1)
>
> > > =A0 =A0 'dates: =A0(5)' =A0 =A0'series1: =A0(5)'
> > > =A0 =A0 '01-Jul-1998' =A0 =A0[ =A01.2346e+003]
> > > =A0 =A0 '02-Jul-1998' =A0 =A0[ =A02.3456e+003]
> > > =A0 =A0 '03-Jul-1998' =A0 =A0[ =A03.4561e+003]
> > > =A0 =A0 '04-Jul-1998' =A0 =A0[ =A04.5612e+003]
> > > =A0 =A0 '05-Jul-1998' =A0 =A0[ =A05.6123e+003]
>
> > > K>> myfts({'01-Jul-1998', '02-Jul-1998'})
> > > ??? Error using =3D=3D> subsindex
> > > Function 'subsindex' is not defined for values of class 'cell'.
>
> > > K>> myfts(['01-Jul-1998', '02-Jul-1998'])
> > > ??? Index exceeds matrix dimensions.
>
> > > K>> myfts(['01-Jul-1998'; '02-Jul-1998'])
> > > ??? Index exceeds matrix dimensions.
>
> > > K>> myfts({'01-Jul-1998'; '02-Jul-1998'})
> > > ??? Error using =3D=3D> subsindex
> > > Function 'subsindex' is not defined for values of class 'cell'.
>
> > > K>> myfts({'07/01/1998'})
> > > ??? Error using =3D=3D> subsindex
> > > Function 'subsindex' is not defined for values of class 'cell'.
>
> > > K>> myfts('07/01/1998')
> > > ??? Index exceeds matrix dimensions.
>
> > > K>> myfts('07/01/98')
> > > ??? Index exceeds matrix dimensions.
>
> > > -----------------
>
> > > How do I index a bunch of dates all at once from a time series object=
?
>
> > > Thanks!
> > >> myfts(1:2)
>
> > ans =3D
>
> > =A0 =A0 desc: =A0Data Reference
> > =A0 =A0 freq: =A0Daily (1)
>
> > =A0 =A0 'dates: =A0(2)' =A0 =A0'series1: =A0(2)'
> > =A0 =A0 '01-Jul-1998' =A0 =A0[ =A01.2346e+003]
> > =A0 =A0 '02-Jul-1998' =A0 =A0[ =A02.3456e+003]
>
> > >> myfts.dates
>
> > ans =3D
>
> > =A0 =A0 =A0 729937
> > =A0 =A0 =A0 729938
> > =A0 =A0 =A0 729939
> > =A0 =A0 =A0 729940
> > =A0 =A0 =A0 729941
>
> > >> myfts.dates(2:4)
>
> > ans =3D
>
> > =A0 =A0 =A0 729938
> > =A0 =A0 =A0 729939
> > =A0 =A0 =A0 729940- Hide quoted text -
>
> > - Show quoted text -
>
> No, I have to use either datenumbers or datestrings to index the time
> series object, I don't want to use something like (2:4), that's not
> convenient;
>
> I would like to find a way to index the time series arbitrarily by
> date string and/or date numbers...
>
> Thanks!- Hide quoted text -
>
> - Show quoted text -
It should be okay according to this webpage:
http://www.mathworks.com/access/helpdesk/help/toolbox/finance/subsref.html
|
|
0
|
|
|
|
Reply
|
lunamoonmoon (258)
|
2/11/2010 6:11:34 PM
|
|
Luna Moon <lunamoonmoon@gmail.com> wrote in message <4dabef60-a89b-4f21-b3e4-7e10967a1d5c@o3g2000vbo.googlegroups.com>...
> On Feb 11, 1:09 pm, Luna Moon <lunamoonm...@gmail.com> wrote:
> > On Feb 11, 12:38 pm, "Donn Shull" <donn.shull.no_s...@aetoolbox.com>
> > wrote:
> >
> >
> >
> >
> >
> > > Luna Moon <lunamoonm...@gmail.com> wrote in message <6bc87d6c-16c0-4aa8-8c4a-d94ea3807...@z1g2000vbo.googlegroups.com>...
> > > > K>> myfts = fints((datenum('07/01/98'):datenum('07/01/98')+4)',...
> > > > [1234.56; 2345.61; 3456.12; 4561.23; 5612.34], [], 'Daily',...
> > > > 'Data Reference');
> > > > K>>
> > > > K>>
> > > > K>> myfts
> >
> > > > myfts =
> >
> > > > desc: Data Reference
> > > > freq: Daily (1)
> >
> > > > 'dates: (5)' 'series1: (5)'
> > > > '01-Jul-1998' [ 1.2346e+003]
> > > > '02-Jul-1998' [ 2.3456e+003]
> > > > '03-Jul-1998' [ 3.4561e+003]
> > > > '04-Jul-1998' [ 4.5612e+003]
> > > > '05-Jul-1998' [ 5.6123e+003]
> >
> > > > K>> myfts({'01-Jul-1998', '02-Jul-1998'})
> > > > ??? Error using ==> subsindex
> > > > Function 'subsindex' is not defined for values of class 'cell'.
> >
> > > > K>> myfts(['01-Jul-1998', '02-Jul-1998'])
> > > > ??? Index exceeds matrix dimensions.
> >
> > > > K>> myfts(['01-Jul-1998'; '02-Jul-1998'])
> > > > ??? Index exceeds matrix dimensions.
> >
> > > > K>> myfts({'01-Jul-1998'; '02-Jul-1998'})
> > > > ??? Error using ==> subsindex
> > > > Function 'subsindex' is not defined for values of class 'cell'.
> >
> > > > K>> myfts({'07/01/1998'})
> > > > ??? Error using ==> subsindex
> > > > Function 'subsindex' is not defined for values of class 'cell'.
> >
> > > > K>> myfts('07/01/1998')
> > > > ??? Index exceeds matrix dimensions.
> >
> > > > K>> myfts('07/01/98')
> > > > ??? Index exceeds matrix dimensions.
> >
> > > > -----------------
> >
> > > > How do I index a bunch of dates all at once from a time series object?
> >
> > > > Thanks!
> > > >> myfts(1:2)
> >
> > > ans =
> >
> > > desc: Data Reference
> > > freq: Daily (1)
> >
> > > 'dates: (2)' 'series1: (2)'
> > > '01-Jul-1998' [ 1.2346e+003]
> > > '02-Jul-1998' [ 2.3456e+003]
> >
> > > >> myfts.dates
> >
> > > ans =
> >
> > > 729937
> > > 729938
> > > 729939
> > > 729940
> > > 729941
> >
> > > >> myfts.dates(2:4)
> >
> > > ans =
> >
> > > 729938
> > > 729939
> > > 729940- Hide quoted text -
> >
> > > - Show quoted text -
> >
> > No, I have to use either datenumbers or datestrings to index the time
> > series object, I don't want to use something like (2:4), that's not
> > convenient;
> >
> > I would like to find a way to index the time series arbitrarily by
> > date string and/or date numbers...
> >
> > Thanks!- Hide quoted text -
> >
> > - Show quoted text -
>
> It should be okay according to this webpage:
>
> http://www.mathworks.com/access/helpdesk/help/toolbox/finance/subsref.html
>> myfts('01-Jul-1998::02-Jul-1998')
ans =
desc: Data Reference
freq: Daily (1)
'dates: (2)' 'series1: (2)'
'01-Jul-1998' [ 1.2346e+003]
'02-Jul-1998' [ 2.3456e+003]
>> myfts('07/01/98::07/02/98')
ans =
desc: Data Reference
freq: Daily (1)
'dates: (2)' 'series1: (2)'
'01-Jul-1998' [ 1.2346e+003]
'02-Jul-1998' [ 2.3456e+003]
|
|
0
|
|
|
|
Reply
|
donn.shull.no_spam (336)
|
2/11/2010 6:36:05 PM
|
|
|
4 Replies
31 Views
(page loaded in 0.455 seconds)
Similiar Articles: Time Series Equations in Simulink - comp.soft-sys.matlab ...From Workspace :: Blocks (Simulink) - www.kxcad.net home... time series object (see ... net home Simulink Time-Series Array. www.kxcad.net Home > CAE Software Index ... Down-cast a polymorphic pointer? - comp.lang.fortran... OOP stuff for the first time, so please bear with me for imprecise using of terminology. ... top of that structure, comes a series ... find index in an array - comp.soft-sys.math.mathematicaIt can operate on non-array objects, in fact ... soft-sys.matlab ... find / ismember / index within structure array - comp.soft-sys ..... monthly means/max in a time series ... max and min of multiple cell arrays - comp.soft-sys.matlab ...... bounding box was the outermost layer of the object or ... find / ismember / index within structure array - comp ... max. values in an array - comp ... Forecasting Time Series ... Linear Pattern Problem - comp.cad.solidworks... as long as they are touching it creates the objects ... this problem is a nice application of linear indexing ... ... comp.cad.solidworks... one part with a series of holes ... speed issues traversing the DOM. - comp.lang.javascript... how can you at page creation time build a set of references to DOM objects..? ... webapp in the sense that its a series of ... contents, the item knows its own index ... improve strlen - comp.lang.asm.x86... routine only about strlen the result is the same time ... This isn't problem on stack either with objects with "auto ... weight and do a masked sum, we might get the index ... Sampling: What Nyquist Didn't Say, and What to Do About It - comp ...... power, PF) that would uglify the local realtime display > or the archived time-series ... It involves feature extraction after the fashion used for object recognition in ... Extracting a ROI from an image. - comp.soft-sys.matlab... Create a binary image ("mask") from the ROI object. ... fprintf(ofid, '%-20s\t %-25s\n', 'Date\time ... pathname(1,:)); fprintf(ofid, ' Index\t ... ASM to C - comp.lang.asm.x86... another platform and couldn't afford to spend much time ... And the purpose of that ADD function was to set a series ... compiler (and version of the compiler) produced an object ... Working with Financial Time Series Objects :: Using Financial Time ...Both integer and date string indexing are permitted when time-of-day information is present in the financial time series object. You can index into the object with both ... Create timeseries object - MATLAB - MathWorks - MATLAB and ...... Index • ... For example, in addition to data and time values, you can also use the time-series object ... 7/16/2012 1:26:20 PM
|