This sounds like a homework assignment. If it is, show what you've done to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to offer guidance.
If you're not sure even where to start because you aren't sure how to work with MATLAB, I strongly recommend going through the MATLAB Onramp free tutorial which will help you learn the essentials of MATLAB programming.
If you're unclear about the question as a whole, I recommend contacting your professor and/or the teaching assistant for your course for clarification.
