Dear Beenish
First of all tell us the learning algorithm.
As you know all of the algorithms are sample based and when you use a fixed step size solver, your training algorithm works well, when you use variable step the sampling time willbe chosen by matlab considering the rest of your parameters and training algorithm can't adapt the parameters.