I need to know how can plot real time sine wave graph of speech signal in app designer.
Show older comments
I would like to design a GUI in-app design for speech/acoustic signal processing. I don't know what to do to plot a real-time sine wave graph
4 Comments
Mario Malic
on 23 Feb 2023
Start from the acquisition, figure out how to obtain a real time signal.
Ayush
on 27 Feb 2023
- Create a new App Designer app by selecting "App Designer" from the MATLAB Home tab.
- Drag and drop an axes component onto the app design canvas.
- Add the following code to the app's startup function to initialize the axes and create a line object for the sine wave:
function startupFcn(app)
% Set the x and y limits of the plot
xlim(app.UIAxes, [0, 2*pi]);
ylim(app.UIAxes, [-1, 1]);
% Create a line object for the sine wave
app.Line = animatedline(app.UIAxes);
end
4. Add an updatePlot function to continuously update with new data.
5.Add a timer component to the app by dragging and dropping it onto the design canvas.
6.Set the timer's period to the desired refresh rate (e.g., 0.1 seconds).
7. Add the call to the updatePlot function in timer's timerFcn callback.
Kulbir
on 27 Feb 2023
Jacob Mathew
on 26 Jun 2025
You can refer to the following documentation that goes through each of the step:
You will need to adapt this as instead of using scopes, you will be plotting it
Answers (0)
Categories
Find more on Filter Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!