Extract the selected region from the harp, pax, and wanc signals. Make sure that the extracted signals are named harp_ROI, pax_ROI, and wanc_ROI respectively and display them

7 visualizaciones (últimos 30 días)
TASK
Extract the selected region from the harp, pax, and wanc signals. Make sure that the extracted signals are named harp_ROI, pax_ROI, and wanc_ROI respectively and display them.
Incorrect
Are the harp_ROI, pax_ROI, and wanc_ROI signals plotted?
Have all three signals been cropped?
How to crop it? And I cant find resample freq. also.

Respuestas (1)

Brahmadev
Brahmadev el 4 de Abr. de 2024
Hi @Layba,
I am assuming that these are output signals from a simulation and stored in your workspace. Cropping the signal or extracting a certain part of it can be done simply by:
% Let's say you want to crop the signals between indices startIdx and endIdx.
startIdx = 101; % Example start index
endIdx = 200; % Example end index
% Cropping the signals
harp_ROI = harp(startIdx:endIdx);
pax_ROI = pax(startIdx:endIdx);
wanc_ROI = wanc(startIdx:endIdx);
For resampling the signal, you can use the resample function in MATLAB and choose any desired frequency you would like:
Fs_original = 1000; % Original sampling frequency in Hz
Fs_new = 500; % New desired sampling frequency in Hz
% Resampling the signal
harp_resampled = resample(harp, Fs_new, Fs_original);
Refer to the following documentation for more information:
Hope this helps!

Categorías

Más información sobre Signal Processing Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by