Not entirely sure what you're asking, structfun applies the same function to each field of a scalar structure. It doesn't look like it's what you're after at all.
If you're asking how to get the value of a particular field having its name stored as text, yes this can be done easily fname = 'value1';
S.(fname).x
Hopefully, your example is for illustration and you're not using numbered variables and numbered field names. Numbered anything is a flawed design and you should replace that with proper indexing:
S(1).value(1).x = 1
S(1).value(2).x = 10;
S(1).value(3).x = 17;
S(2).value(1).x = 12;
S(2).value(2).x = 11;
S(2).value(3).x = 13;
S(3).value(1).x = 142;
S(3).value(2).x = 11;
S(3).value(3).x = 113;
which completely removes the need to generate field names as strings.
Best Answer