help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GUI radio button issue


From: Grumpulus
Subject: Re: GUI radio button issue
Date: Wed, 7 Nov 2018 18:51:18 -0600 (CST)

% Args: fHandle is a figure handle.
%       AsC and AsO are numerical matrices with the same size.

function guitest(fHandle, AsC, AsO)

if (!size_equal(AsC, AsO))
  error("Arguments must have equal sizes");
end

set(fHandle,'Position',[300 100 560 880]);

ax1 = axes;

set(ax1, 'Position', [0.13 0.21 0.775 0.715]);

gp = uibuttongroup(fHandle, 'Position', [0.05 0.02 0.15 0.15]);

b1 = uicontrol(gp, "Style",     "Radiobutton", "String", "1", ...
                   "Position",  [0 67 100 32], ...
                   "Value",     1, ...
                   "CreateFcn", address@hidden, ax1, AsC}, ...
                   "Callback",  address@hidden, ax1, AsC});

b2 = uicontrol(gp, "Style",     "Radiobutton", "String", "2", ...
                   "Position",  [0 34 100 32], ...
                   "Callback",  address@hidden, ax1, AsO});

b3 = uicontrol(gp, "Style",     "Radiobutton", "String", "3", ...
                   "Position",  [0  1 100 32], ...
                   "Callback",  address@hidden, ax1, AsC-AsO});
endfunction

function cbackfcn(src, eventdata, ax1, Asm)

  imagesc(ax1, Asm);

endfunction





--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]