I have lots of variables in the workspace in MATLAB and I have to create some statistics through a function. I need to enter the name of the variable as a function input and I need to return its value in the function and then process it.
varName='Sa'
function [ someStatistics ] = AnalyzeThis (varName);
So, in this AnalyzeThis function, I need to obtain the value of Sa (which is a one-dimensional array). How can I do that?