This isn't a place to outsource your coding...
I suggest you read
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!