"Magnus Lilledahl" <firstname.lastname@example.org> wrote in message
> I am using the following code to make some Radiobuttons mutually exclusive
> function radio_tilescan_callback(source,eventdata);
> val = get(source,'Value'); p =
> set(hRadioCellStack,'Value',abs(1-val)); end
> However, when I click the button to which this function is assigned as a
> callback I get the error:
> One or more output arguments not assigned during call to "set".
> When I remove the 'p =' there is no error message and val = 1 is displayed
> in the command window, However I would like to avoid having output being
> displayed all the time (and also understand why this error occurs).
> Any help is appreciated.
Called using the three-input syntax, SET doesn't return an output. It
sounds to me that when you removed the "p =" you also removed the semicolon
at the end of the previous line -- just remove the "p =" without removing
the semicolon and you should avoid both the error and the command window
display (unless some other function assigns a value to a variable named val
on a line that doesn't end in a semicolon, in which case you'll need to find
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ