How to end code folding
1 回表示 (過去 30 日間)
古いコメントを表示
Mohamad Roslan Mohd Roshdi
2016 年 1 月 22 日
コメント済み: Mohamad Roslan Mohd Roshdi
2016 年 1 月 23 日
Dear friend I'm new to Matlab and have zero coding experience I had this problem as i want to write new command
It keep written under that function loop, I tried to use 'end', but return error as Illegal use of reserved keyword "end"
How to exit the code folding for the function and start new command line?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/153488/image.jpeg)
*sorry for my english
2 件のコメント
Stephen23
2016 年 1 月 22 日
編集済み: Stephen23
2016 年 1 月 22 日
code folding does not change the code itself, it only changes how the code is displayed. The error message tells you that you have written something wrong with your code, but the code folding cannot fix it, just show it, or hide it.
Try clicking on the small + symbol on the left-hand side of the editor to unfold the code (i.e. to see more of the code).
If you upload the code then we can tell you what is causing the error.
採用された回答
Image Analyst
2016 年 1 月 22 日
If you want a new function that is not to be considered as part of the Apply_Callback() function, then you need to use the "function" keyword:
function Apply_Callback(hObject, eventdata, handles)
% code for Apply_Callback()
% Now define your new function:
function mAs = MyNewFunction(ma)
mAs=(floor(mA));
2 件のコメント
Walter Roberson
2016 年 1 月 23 日
Note that it is not possible in MATLAB to have a file that has both functions and "command line" (scripts). In a function file, everything has to be in a function.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Whos についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!