MATLAB: Remove parameter from workspace

MATLABworkspace

Hey!
I need to remove a parameter from workspace.. the parameter name is saved in a variable 'param_name' which is of course also in workspace. At a given moment I need to remove this parameter, but I can refer to it only by using my variable 'param_name'. How is this possible? I tried clearvars param_name but everybody knows that the result of this will be the removing of the variable 'param_name'.
Thanks! Diana

Best Answer

Use functional syntax
clearvars(param_name);
instead of command syntax.