Get the value of a parameter in a parameter list
[res,err] = get_param(list_name,param_name,default_value)
the list of parameters. This list must have been initialized by a call to init_param.
a string. The name of the parameter to be add in the list of parameters.
the default value to be stored in the parameter if param_name has not been found.
the value of the parameter. If the parameter does not exist, res = [].
an error flag which is set to %T if list_name is not of type plist (this list has not been initialized by a call to init_param).
This function returns the value of the parameter param_name in a parameter list. If the err output parameter is not present, when an error occurs, a message is printed in the console.
mylist = init_param(); mylist = add_param(mylist,'minbound',[0 0 0]); disp(get_param(mylist,'minbound',-[1 1 1])); disp(get_param(mylist,'maxbound', [1 1 1])); | ![]() | ![]() |