Skip to content
Snippets Groups Projects
Commit 3e9f4807 authored by Marina Kreme's avatar Marina Kreme
Browse files

unnecessary file deletion

parent 06776991
No related branches found
No related tags found
No related merge requests found
function [x_wideband,x_localized] = load_pairs(ind_wideband, ind_localized, resampling_fs, sig_len, deb)
% [x_wideband,x_localized] = load_pairs(ind_wideband, ind_localized, resampling_fs, sig_len, deb)
% Load data from .mat file. Return the target and the perturbation signals.
%
% Inputs:
% - ind_wideband:(int)index of signals that have a wideband spectrogram
% - ind_localized: (int) index of signals that have a well-localized spectrogram.
% - resampling_fs : desired sampling frequency.
% - sig_len: (int). signal length
% - deb: Start point of the signal in ms. deb =0 by default
%
% Outputs:
% - x_wideband: target signal
% - x_localized: perturbation signal (localized in time-frequency)
%
% Author : A. Marina KREME
% e-mail : ama-marina.kreme@lis-lab.fr/ama-marina.kreme@univ-amu.fr
% Created: 2020-28-01
%%
if nargin < 4
deb=0;
end
data = load('signal_lists.mat');
m = size(data.wide_band_sources_files, 1);
n = size(data.localized_sources_files, 1);
if ind_wideband > m || ind_localized > n
error('%s: The ind_wideband or ind_localized value you entered is outside the value range. Please try another value.', upper(mfilename));
end
wideband_file = [data.wide_band_sources_files(ind_wideband).folder, ...
filesep, ...
data.wide_band_sources_files(ind_wideband).name];
localized_file = [data.localized_sources_files(ind_localized).folder, ...
filesep, ...
data.localized_sources_files(ind_localized).name];
x_localized= wave_read(localized_file, resampling_fs, sig_len, deb);
x_wideband= wave_read(wideband_file, resampling_fs, sig_len, deb);
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment