Search the courses, subjects, tracks, games and features, or jump straight to a page.
Learn it your way
A short class with Sarah and her students. The other ways are under More.
Sign up free to listen. Transcripts are free to read.
Today, we will explore real-time plotting using MATLAB. Real-time plotting allows us to visualize audio signals instantaneously as they're recorded. Can anyone tell me why real-time visualization is important?
It helps us understand how the sound looks in a waveform form!
Exactly! It helps in analyzing the characteristics of the signal. We use the plot() function primarily. How do you think we would set up our audio recorder in MATLAB?
We can use audiorecorder!
Correct! And after recording, we can plot it. The basic command would be plot(myRecording);. Would anyone like to give it a try with a sample audio?
Now that we can plot the data, what do we actually see in these plots? When we look at the plot of an audio signal, what do the axes represent?
The x-axis shows the sample index, while the y-axis shows the amplitude of the sound wave.
Exactly! Proper labeling of these axes is crucial. What would we want to include in our plot for clarity?
We should add titles and labels to the axes!
Great! Using xlabel(), ylabel(), and title(), we can clarify our plot. If we call xlabel('Sample Index') and ylabel('Amplitude'), what do we communicate to the viewer?
It helps them understand what they are looking at in the plot.
Let's try a short demonstration. Who can set up the recording code for us?
We can do recObj = audiorecorder(44100, 16, 1); and then recordblocking(recObj, 5); to get 5 seconds of audio.
Good job! And once we have the recording, what’s the next step?
We retrieve the audio data using myRecording = getaudiodata(recObj); and then plot it.
Exactly! Now let's visualize. After plotting, it's important to discuss what features we analyze from the wave. Can anyone think of features like peaks or troughs?
The process of visualizing signals as they are produced, allowing for immediate analysis.
A MATLAB tool used for capturing audio input.
A MATLAB command used to create a graphical representation of data.
The strength of the audio signal, represented visually in a plot.
To plot and see, use plot with glee, amplitude and time, in harmony!
Imagine capturing sound in a jar (audiorecorder), and looking inside (plot) to see how the sound was shaped—tall and short waves tell if it's loud or soft.
P.A.T: Plot, Amplitude, Time - Remember how to analyze audio signals.
A.P.S: Amplitude, Plot, Sample - Key elements in audio signal visualization.
Term
What function do you use to label the y-axis?
Click to flip
Term
What does the x-axis represent in an audio plot?
Click to flip
The capability to visualize data or signals as they are being recorded or processed.
A MATLAB object that records audio data from an input device.
A MATLAB function used to create a graph of data points in 2D.
The height of the wave; represents the intensity of the sound.
The discrete time points at which the amplitude of the signal is measured.
This section covers how to perform real-time plotting of audio signals in MATLAB to visualize the amplitude over time.
In this section, we learn how to utilize MATLAB to plot real-time audio signals. The primary focus is on using the plot function to display the collected audio waveform, along with labeling the axes and providing meaningful titles to ensure clarity.
Real-time plotting in MATLAB is crucial for visualizing signals as they are captured. The section begins by outlining the basic command needed to plot audio data captured by MATLAB's audiorecorder – specifically, the plot() function. By executing the command plot(myRecording);, we can instantly generate a visual representation of this audio data. The addition of labels and titles using xlabel(), ylabel(), and title() functions enhances the interpretability of the plot, framing the waveform in a clear context. This section emphasizes the importance of real-time visualization in signal processing, not only for analysis but for practical adjustments during live signal acquisition.