Thanks for the reply DaleSpam.=)
I already know what causes my problem in Matlab(presence of variable t both inside and outside the error function and exp...by the way,solve() isn't able to handle erf,since it only handles linear expressions whereas erf is recursive).
I posted this here,so...