I'm having trouble assigning variable names to data sets in M-files. I currently have an M-file which prompts for data vectors DATA1, DATA2... from a very large matrix and does some processing on them, including sorting them according to various conditions COND1, COND2...
I would like the function to return variables 'dataxcondy' where datax refers to the user-specified data vector (which actually have names like 'TIME', 'TEMP1'...there are 100+ more) and condy refers to the condition matrix: in Matlab speak,
Now the problem. I would like the variable name to use the lowercase version of the name of the data vector. So if my file asks
> dname1 = input('Data channel 1: ','s')
and I respond
I would like to get back the variables 'timecond1', 'timecond2'... without hardcoding the variable names in my function (or script, if that would be easier) Essentially, I want the functional equivalent of
[lower(dnamex) 'condy'] = CONDY(:,X);
(This construction returns the error message: Missing operator, comma, or semi-colon.)