f



One or more output arguments not assigned during call to "set".

Hi

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.

Magnus
0
Magnus
3/22/2010 4:58:02 PM
comp.soft-sys.matlab 211264 articles. 26 followers. lunamoonmoon (257) is leader. Post Follow

2 Replies
1981 Views

Similar Articles

[PageSpeed] 59

"Magnus Lilledahl" <mlilledahl@gmail.com> wrote in message 
news:ho87iq$amo$1@fred.mathworks.com...
> Hi
>
> 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 
those lines.)

-- 
Steve Lord
slord@mathworks.com
comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ 


0
Steven
3/22/2010 5:03:39 PM
It works exactly as you say. I must have gotten confused in the debugging. Thanks for the extremely prompt response.

Magnus
0
Magnus
3/22/2010 5:14:04 PM
Reply: