Actualizar handles dentro de un uipushtool y ClickedCallback
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Buenas tardes amigos.
El motivo de mi pregunta es para saber si alguien de ustedes sabe actualizar el handles que se ha pasado como parámetro a una función handles desde un objeto uipushtool en su evento ClickedCallback.
function plotSin(hObject, handles)
cmP=10;
cnP=10;
fh = figure;
tbh = uitoolbar(fh);
uipushtool(tbh,'CData',imread('Complementos\Rojo.png'),'Separator','off',...
'TooltipString','Your toggle tool',...
'HandleVisibility','off',...
'ClickedCallback',...
{@marcarPunto,handles, cmP,cnP});
function marcarPunto(hObject,event,handles,cmP,cnP)
[handles.pnSin(cnP,cmP),handles.pmSin(cnP,cmP)]=ginputc(1, 'Color', 'w');
guidata(hObject,handles);
Tomando en consideración que dentro de la estructura handles tengo las matrices pnSin, pmSin.
El problema es que no logro actualizar el handles que entra como parámetro en la función principal (plotSin) cuando el handles llega a la función marcarPuntos,.
Gracias por su ayuda.
0 Kommentare
Antworten (1)
Walter Roberson
am 23 Okt. 2016
[handles.pnSin(cnP,cmP),handles.pmSin(cnP,cmP)]=ginputc(1, 'Color', 'w');
is saving both outputs of ginputc() to the same place, which will result in handles.pmSin(cnP,cmP) holding only the y value. Is that what you want?
0 Kommentare
Siehe auch
Kategorien
Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!