the problem solved after talking to matlab engineers. it was a bug in 2013b and previous versions. it is written on bug reports on mathwork site, and installing patch found on mathworks site solved the problem.
thank you all for your help!
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!