My code essentially loads in a .mat file with a number of data arrays in it. As the user names the arrays in this file what they want, the tell my code what the variable names are through a GUI, which saves the array names to a string in another variable.
I need to perform a detrend() on these arrays before plotting them, however the detrend function references the variable name rather than the array.
Example: ... varName = get(handles.edit1,'String') ; %'Data1' ... Load (file.mat) %contains data arrays
Data = detrend(double(varName)); ...
varName = str2double(get(handles.edit1,'String') )?