Matlab - How to concat dataset name + i in for loop? -
i have dataset containing several arrays identified generic name , number. modify arrays independently each other in loop so:
for i=1:length(dataset) dataset.genericname_i(row,column)=f(x) end
do know way that?
thanks!
unless misunderstood looks dynamic field referencing.
you (using k
instead of i
loop counter...try avoid using either i
or j
purpose):
for k=1:length(dataset) name = sprintf('genericname_%i',k); %// note use of brackets create dynamic field dataset.(name) =f(x); end
is meant?
Comments
Post a Comment