I have a function in which I need to input a name which later assigns a name to the output the matfile.
function(filename2) % we need to input i.e "systolicAmplitude"
filename=[HBO;HBR];
matfileGroupInfo=strcat(filename2,'.mat');
save(matfileGroupInfo)
I faced an error "string cannot be used as a variable name". Any solution how I can solve the problem?
**I have the option to re-write the code as below:
function(filename) % we need to input i.e "systolicAmplitude"
vec=[HBO;HBR];
matfileGroupInfo=strcat(filename2,'.mat');
save(matfileGroupInfo,'vec')
but it saves the variable under name of systolicAmplitude.vec. This is not favored for me.
HBOandHBRare? How are you retrieving them? What is that function declaration?'systolicAmplitude'.