Hi yasmeen,
Try using the uicontrol function to create a text area (uicontrol of style 'text'). Then, you can set the 'String' property of the text area to the data you want to display. Here is a simple example:
% Create a GUI figure
fig = figure;
% Create a text area
txt = uicontrol('Style', 'text', 'Position', [50, 50, 200, 100], 'String', 'Your Data Here');
% Update the text area with new data
new_data = 'New Data to Display';
set(txt, 'String', new_data);
So, in the above code snippet, I first created a GUI figure, then a text area with initial data. Later, I updated the text area with new data by setting the 'String' property of the text area. This approach will allow you to dynamically display data on a text area within your MATLAB GUI.
Note: When I executed the code using mobile Matlab, a warning message was displayed like the one shown below. However, the main point was to answer your question which was displaying data on a text area. Warning: In a future release, UI components will not be included in the output. To include UI components, use the exportapp function.
Please see attached result.
I hope this answers your question.