Signal Processing Onramp Quick Reference

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

Signal Processing Onramp

Conclusion
Summary
Summary

Signal Analyzer Workflow

Import Signals

1. Import signals from files to the Workspace using the readmatrix function.
2. Set the time information for each signal with Time Values.
3. Drag signals from the Workspace Browser to the axes to display them.
4. Display different signals using the checkboxes in the Filter Signals panel.
Visualize Signals

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 1/6
10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

1. Use the Display tab to visualize your signal in the time domain, frequency domain, or time-frequency domain.
2. To customize the visualization, use the appropriate tab. For example, you can customize the power spectrum in
the Spectrum tab.
Preprocess and Filter Signals

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 2/6
10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

1. To modify signals, click Preprocess in the Analyze tab to enter preprocessing mode.
2. Duplicate signals before modifying them so that you can compare your signals before and after applying
techniques.
3. Select preprocessing techniques from the Functions dropdown.
4. The Function Parameters panel will open. Set the appropriate specifications and click Apply.
5. Click Accept All to leave preprocessing mode.

Generate Signals

fs = 100;
The sample rate is the number of samples that are generated
per second.

t = 0:1/fs:1;
Specify the start and end times of your signal. This time vector
extends from 0 seconds to 1 second. The spacing between
1
each point is .
fs

sig = sin(2*pi*f*t);
Calculate a sine wave at each point in t . Change the value of
f to change the signal's frequency.

noise = 0.1*randn(size(sig));
To make the generated signal more realistic, you can add noise
sigNoisy = sig+sigNoisy;
by adding a vector of random numbers.

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 3/6
10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

Function Reference

Function Description Example

resample Resample nonuniform signal to a uniform sig = resample(sig,tx,fs)


sample rate

resample Resamples the input sequence at p/q times sig = resample(sig,p,q)


the original sample rate

alignsignals Align two signals by delaying earliest signal [xa,ya] = alignsignals(x,y)

pspectrum Display the power spectrum pspectrum(sig)

pspectrum Display the spectrogram pspectrum(sig,"spectrogram")

cwt Display the continuous wavelet transform cwt(sig,fs)


Requires the Wavelet Toolbox

lowpass Lowpass filter a signal lowpass(sig,10)

bandpass Bandpass filter a signal bandpass(sig,[8 12])

lowpass Filter with modified steepness lowpass(sig,10,"Steepness",0.95);

Find Local Extrema Find local maxima and minima in the Live
task Editor

Compare Visualizations

Time Domain Frequency Domain

Time-Frequency Domain Time-Frequency Domain


Spectrogram Scalogram

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 4/6
10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 5/6
10/29/23, 7:15 PM Signal Processing Onramp - Quick Reference

https://matlabacademy.mathworks.com/artifacts/quick-reference.html?course=signalprocessing&language=en&release=R2023a 6/6

You might also like