Azzera filtri
Azzera filtri

Handles in Matlab Guide

3 visualizzazioni (ultimi 30 giorni)
Amanda
Amanda il 1 Set 2012
I am having a difficult time understanding use of handles
in MATLAB's guide. WHEN TO USE THEM?
For example, this is MATLAB's example how to use MATLAB Guide:
handles.peaks = peaks(35);
[x, y] = meshgrid(-8:.5:8)
handles.current_data = handles.peaks
surf(handles.current_data)
I guess we are using handles to pass data to the functions.
I'm confused.
Thanks,
Amanda

Risposta accettata

Image Analyst
Image Analyst il 1 Set 2012
That's correct. That's one of the ways to make an otherwise local variable into a global variable so that they can be seen in other functions. Most of the other ways are discussed here: http://matlab.wikia.com/wiki/FAQ#How_can_I_share_data_between_callback_functions_in_my_GUI.28s.29.3F In your case you don't need to do that unless you're going to need those variables later, in a different function or callback function.

Più risposte (0)

Categorie

Scopri di più su Migrate GUIDE Apps in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by