Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
42d71c7b
Commit
42d71c7b
authored
Sep 26, 2011
by
Stéphane Adjemian
Browse files
Added header.
parent
cc2c70d8
Changes
1
Show whitespace changes
Inline
Side-by-side
matlab/@dynTime/setTime.m
View file @
42d71c7b
function
sp
=
setTime
(
sp
,
i
,
date
)
if nargin==3
%
Update
time
member
of
a
dynTime
object
.
%
@info
:
%!
@deftypefn
{
Function
File
}
{
@var
{
sp
}
=
}
setTime
(
@var
{
sp
},
@var
{
i
},
@var
{
freq
})
%!
@anchor
{
@dynTime
/
setTime
}
%!
@sp
1
%!
Update
time
member
of
a
dynTime
object
.
%!
@sp
2
%!
@strong
{
Inputs
}
%!
@sp
1
%!
@table
@
@var
%!
@item
sp
%!
dynTime
object
instantiated
by
@ref
{
dynTime
}
%!
@item
i
%!
(
if
nargin
==
3
)
scalar
integer
,
targeting
a
row
of
the
matrix
@var
{
sp
}.
time
(
see
@ref
{
dynTime
}
for
a
description
of
this
matrix
).
%!
@sp
1
%!
(
if
nargin
==
2
)
nobs
*
2
matrix
of
integers
(
see
@ref
{
dynTime
}
for
a
description
of
this
array
).
%!
@item
date
%!
row
vector
of
two
integers
(
see
@ref
{
dynTime
}
for
a
description
of
the
rows
of
@var
{
sp
}).
%!
@end
table
%!
@sp
1
%!
@strong
{
Outputs
}
%!
@sp
1
%!
@table
@
@var
%!
@item
sp
%!
Updated
@ref
{
dynTime
}
object
.
%!
@end
table
%!
@sp
2
%!
@strong
{
Example
}
%!
@sp
1
%!
Let
@var
{
sp
}
be
an
object
instantiated
by
@ref
{
dynTime
},
both
following
syntaxes
can
be
used
to
update
the
time
member
:
%!
@sp
1
%!
@example
%!
sp
=
setTime
(
sp
,
2
,[
1950
,
4
]);
%!
@end
example
%!
or
%!
@example
%!
sp
=
sp
.
setFreq
(
2
,[
1950
,
4
]);
%!
@end
example
%!
@sp
1
%!
Note
that
the
second
syntax
is
probably
slower
than
the
first
one
,
and
should
not
be
used
in
a
large
loop
.
%!
@sp
2
%!
@strong
{
This
function
is
called
by
:
}
%!
@sp
2
%!
@strong
{
This
function
calls
:
}
%!
%!
@end
deftypefn
%
@eod
:
if
nargin
==
3
sp
.
time
(
i
,
:
)
=
date
;
elseif nargin==2
elseif
nargin
==
2
if
isa
(
i
,
'
dynTime
'
)
sp
.
time
=
i
.
time
;
else
sp
.
time
=
i
;
end
end
\ No newline at end of file
end
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment