MATLAB: App Designer Text Area “Too many Outputs”

app designermorse code

I am trying to make an App that listens to morse code and displays the english text in real time. I have my functions and they work great (thanks to Walter Roberson). The actual listening and decoding is not the issue. The problem I am having is that when I try and display the output from the decoder I get an error saying "too many output arguments". When I try to run the decoder outside of the app with the same recording it works fine, but for some reason MATLAB does not want to print the output to the Text Box, any ideas?
% Callbacks that handle component events
methods (Access = private)
% Button pushed function: Button
function ButtonPushed(app, event)
recorder();
app.TextArea.Value = demorse('morseRecording.wav');
end
% Value changed function: TextArea
function TextAreaValueChanged(app, event)
value = app.TextArea.Value;
end
end

Best Answer

Your function demorse does not have an output
function demorse(wavfile)
Yet when you use it, you are telling MATLAB to return one.
app.TextArea.Value = demorse('morseRecording.wav');
See this page for how to properly create outputs for a function.