GUI Examples using Nested Functions

버전 1.0.0.0 (3.55 KB) 작성자: Steven Lord
These two examples demonstrate how to use nested functions to reduce parameter passing in GUIs.
다운로드 수: 15.8K
업데이트 날짜: 2005/3/30

라이선스 보기

편집자 메모: This file was a File Exchange Pick of the Week

These two examples, which were originally posted in the MATLAB newsgroup comp.soft-sys.matlab, demonstrate how to use the nested function capability of MATLAB 7.0 (R14) and later versions to reduce the number of parameters that need to be passed into and between callbacks inside a GUI M-file. Each nested function in one of these examples is contained in its own cell; if you enable cell mode in the MATLAB Editor and place the cursor in a given nested function, you will be able to see where each nested function begins and ends. Each example is extensively commented and indicates when variables from a parent function's workspace are being used by a nested function.

To execute these examples, simply unzip the ZIP file and place the contents in a directory on your MATLAB path, then execute "red_blue" or "red_blue_two" without the quotes at the MATLAB prompt.

For more information on nested functions, please check the Programming section of the MATLAB documentation.

NOTE: These examples will only function using MATLAB 7.0 (R14) and later. Versions of MATLAB prior to 7.0 did not have the ability to nest functions and you will receive an error about an undefined function or variable 'red' if you try to use it in earlier versions.

인용 양식

Steven Lord (2024). GUI Examples using Nested Functions (https://www.mathworks.com/matlabcentral/fileexchange/7301-gui-examples-using-nested-functions), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R14
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Develop Apps Using App Designer에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0