Exercise 1: List the MATLAB command to start Guide with an existing project name
ID: 2998285 • Letter: E
Question
Exercise 1: List the MATLAB command to start Guide with an existing project named 'myGUI'.
Exercise 2: Explain the differences between a function, a subfunction and a nested function.
Exercise 3: When using Guide what are two ways to bring up the object inspector?
Exercise 4: In a Guide developed GUI describe the three parameters to a callback function.
Exercise 5: What GUI object parameter do you change in order to change the name of the object within your code.
Exercise 6: From within a Guide developed GUI callback function, how would you change the text shown on a static text object named 'mass' when the callback is executed.
Exercise 7: What parameter do you define for a GUI object to have it change size as the user changes the size of the window?
Exercise 8: Copy the entire function handle associated with the unitgroup Button Group widget for SelectionChangedFcn in the guide GUI with uicontrols sample.
Exercise 9: List what items are in the Tools menu within GUIDE and what is their function.
Exercise 10: List the names of all widgets (controls) that you can add to the GUI on the guide tool pallet on the left side.
Explanation / Answer
Hi,
TabPanel Constructor offers the easiest way for creating of tabpanels in MATLAB!
- No programming is necessary!
- All tabpanels can be edited comfortably with GUIDE!
- All MATLAB UI controls are supported.
- result is the original FIG-file and the accompanying M-file which is automatically extended with callbacks
- No ActiveX or JAVA components are used!
What Are Nested Functions?
A nested function is a function that is completely contained within a parent function. Any function in a program file can include a nested function.
For example, this function named parent contains a nested function named nestedfx:
The primary difference between nested functions and other types of functions is that they can access and modify variables that are defined in their parent functions. As a result:
A nested function is literally defined in the middle of another
function and requires end statements:
Here is a example of a nested function:
function t = test()
x = 1
function t1 = intest(t)
t1 = t + 10
end
y = intest(x)
end
Here is the same code as a subfunction:
function t = test()
x = 1
y = intest(x)
function t1 = intest(t)
t1 = t + 10
You must be careful with scope in nested functions as all variables
in the parent function are global to the nested function.
Here i am posted whatever i Know.
Please give me good rating.
Thanks in advance
Nested functions can use variables that are not explicitly passed as input arguments.
In a parent function, you can create a handle to a nested function that contains the data necessary to run the nested function.
Requirements for Nested Functions
Typically, functions do not require an end statement. However, to nest any function in a program file, all functions in that file must use an end statement.
You cannot define a nested function inside any of the MATLAB
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.