here is the solution i didn't know what is wrong i tried many times can you help me please
You are assuming the value of some variables which should not be the case.
Also, it's best to not post solutions (or solution attempts) in comments. Questions or comments specific to a solution can be posted in a comment tied to said solution or solution attempt.
the solution is right. maybe this can be helpful.
A and f must in solution
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office