How do I display warning messages created in a function, outside of the app. Like a feedback system if certain tasks succeed.
For example:
function [data]=somefunction(filename)
if ~isfile(filename)
warning('File not found')
end
data = readtable(filename);
end
This is called by a buttonpushedfunction
function OpenButtonPushed(app, event)
[app.data] = initvar();
app.TextArea.Value =[app.TextArea.Value];
end
How do I connect the warning message to the value in the TextArea?
The warning message does show in the command window in Matlab.
I have tried adding the link in the warning message in the function, but this did not help.
Thank you in advance.