function without matching end
Show older comments
hello everyone,
I have got a m file which reads in data and plots the data in a GUI. In the main file itself there are many functions written. My understanding was that each function needs an end statement. In the code that I have functions are without end statement. What could be the reason for this . I am copying part of code for reference.
function panel_sp_1_CreateFcn(hObject, eventdata, handles)
set(hObject, 'UserData', 0);
The above function is from my code. The function does not have an end statement.
Accepted Answer
More Answers (1)
No, sub-functions do not necessarily have to have end statements. However, once you close one sub-function with an end statement, you must do so for all functions within that mfile.
1 Comment
Categories
Find more on Workspace Variables and MAT Files 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!