This looks like a homework problem. Please show the attempts you've made so far and mention where you're getting stuck.
Since you say you are unfamiliar with the language here are a couple of links to get you started:
- Examples of using the fft function
- Example: DFT Estimation with Goertzel Algorithm
- MATLAB Onramp - Free tutorial to get a hang of MATLAB basics