I'm trying to dynamically create variable names, for array and struc variables. However, my usual way (below) does not work, as the brackets and dots used in the names of struc array variables are not accepted:
>> varName = genvarname ( ['a(i,j).sampleNo' num2str(n) ] )
>> varToPlot = eval(varName)
Unrecognized function or variable 'a0x28i0x2Cj0x290x2EsampleNo2'.
Any suggestions? Thanks!