Home > matlab > acado > packages > +acado > @Parameter > Parameter.m

Parameter

PURPOSE ^

Parameter

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

Parameter

  Usage:
    >> Parameter(name);
    >> Parameter name;                          SHORTHAND
    >> Parameters name1 name2 name3 ....        SHORTHAND

  Parameters:
    name        A valid matlab variable name [STRING]

  Example:
    >> Parameter p;

  Licence:
    This file is part of ACADO Toolkit  - (http://www.acadotoolkit.org/)

    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
    Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven.
    Developed within the Optimization in Engineering Center (OPTEC) under
    supervision of Moritz Diehl. All rights reserved.

    ACADO Toolkit is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
    version 3 of the License, or (at your option) any later version.

    ACADO Toolkit is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public
    License along with ACADO Toolkit; if not, write to the Free Software
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA

    Author: David Ariens
    Date: 2009

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SUBFUNCTIONS ^

SOURCE CODE ^

0001 %Parameter
0002 %
0003 %  Usage:
0004 %    >> Parameter(name);
0005 %    >> Parameter name;                          SHORTHAND
0006 %    >> Parameters name1 name2 name3 ....        SHORTHAND
0007 %
0008 %  Parameters:
0009 %    name        A valid matlab variable name [STRING]
0010 %
0011 %  Example:
0012 %    >> Parameter p;
0013 %
0014 %  Licence:
0015 %    This file is part of ACADO Toolkit  - (http://www.acadotoolkit.org/)
0016 %
0017 %    ACADO Toolkit -- A Toolkit for Automatic Control and Dynamic Optimization.
0018 %    Copyright (C) 2008-2009 by Boris Houska and Hans Joachim Ferreau, K.U.Leuven.
0019 %    Developed within the Optimization in Engineering Center (OPTEC) under
0020 %    supervision of Moritz Diehl. All rights reserved.
0021 %
0022 %    ACADO Toolkit is free software; you can redistribute it and/or
0023 %    modify it under the terms of the GNU Lesser General Public
0024 %    License as published by the Free Software Foundation; either
0025 %    version 3 of the License, or (at your option) any later version.
0026 %
0027 %    ACADO Toolkit is distributed in the hope that it will be useful,
0028 %    but WITHOUT ANY WARRANTY; without even the implied warranty of
0029 %    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0030 %    Lesser General Public License for more details.
0031 %
0032 %    You should have received a copy of the GNU Lesser General Public
0033 %    License along with ACADO Toolkit; if not, write to the Free Software
0034 %    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
0035 %
0036 %    Author: David Ariens
0037 %    Date: 2009
0038 %
0039 classdef Parameter < acado.Expression   
0040     properties(SetAccess='private')
0041 
0042     end
0043     
0044     methods
0045         function obj = Parameter(name)
0046             global ACADO_;
0047             
0048             if (isvarname(name) ~= 1)
0049                 error( 'ERROR: The variable name you have set is not a valid matlab variable name. A valid variable name is a character string of letters, digits, and underscores, totaling not more than namelengthmax characters and beginning with a letter.' );
0050             end
0051 
0052             obj.name = name;
0053             
0054             ACADO_.helper.addP(obj);     
0055             ACADO_.helper.addInstruction(obj);  
0056         end
0057         
0058         getInstructions(obj, cppobj, get)
0059     end
0060     
0061 end
0062

www.acadotoolkit.org/matlab
Generated on Tue 01-Jun-2010 20:14:12 by m2html © 2005