??? Error: File: thesiswmark.m Line: 405 Column: 1 Function definitions are not permitted in this context.
Show older comments
Please rectify the error.I request you to send the correct code to my mail id.Thank You.
Answers (1)
This sounds funny: You request us to send the correct code? But as long as you do not post the current code, how could the forum fix it?
But beside this it is your turn to fix your code. If you search in this forum, you will find a lot of equivalent error messages. They appear if you try to define a function inside a script file. Script files are M-files, which do not start with the keyword "function". So either export the function to an individual M-file or inster the keyword "function" on top of the complete M-file and care for proper input arguments.
You can learn more about scripts and function by reading the "Getting Started" chapters of the documentation. A powerful tool like Matlab cannot be usedf efficiently without reading the manuals.
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!