The fastest training function is generally "trainlm", but it require more memory and being less efficient for large networks (with thousands of weights). If your networks is large, trainscg and trainrp are good choices
There is no optimal training function. “trainlm” is a common choice. You may also want to check Bayesian training. If you don’t achieve good results then maybe the training function is not the problem. You may try to modify your training set of to simplify the problem at hand before presenting it to the network. This paper may give you some tips:
2016, “Improved Shape Parameter Estimation in K Clutter with Neural Networks and Deep Learning”. International Journal of Interactive Multimedia and Artificial Intelligence, Vol. 3, N. 7, pp. 3-13, Spain, ISSN: 1989 – 1660.