Now I have several interpolation functions called x30, x50, z30, z50...... I wish to write a function to call these function by inputing x or z and numbers automatically, and assign a argument x to them

I have tried


but not so successful.

Is there any possible method?

  • $\begingroup$ Look up Symbol[]. $\endgroup$ Commented Jul 22, 2015 at 8:52
  • $\begingroup$ I have marked your question as a duplicate. Please follow the link inserted at the top of your post and read the answers there. However know that in most cases you should be using a different approach, namely "indexed variables" as I explained here. $\endgroup$
    – Mr.Wizard
    Commented Jul 22, 2015 at 8:54
  • $\begingroup$ Thank you! This bothered me a long time! $\endgroup$
    – Andy Huang
    Commented Jul 22, 2015 at 10:55


Browse other questions tagged or ask your own question.