Azzera filtri
Azzera filtri

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

2 visualizzazioni (ultimi 30 giorni)
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.

Risposte (1)

Brahmadev
Brahmadev il 4 Apr 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!

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by