Hi Aryan Efty Sham,
Have a look in the community forum. The method has been discussed several times already, e.g. https://de.mathworks.com/matlabcentral/answers/602329-fixed-point-iterative-method-for-finding-root-of-an-equation
When posting homework questions, it is good practice to show what you have tried so far and ask a specific question concerning implementation and/or method functionality. Only in very rare occasions members will do your homework for you.
Kind regards,
Robert