Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tp-audio-ee-etudiant-m24duboc
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Admin message
La purge estivale des projets de gitlab-df sera réalisée jeudi 10 juillet vers 10h.
Show more breadcrumbs
UEEE
sar-signal-audio
gr-vhdl-m24duboc
tp-audio-ee-etudiant-m24duboc
Commits
4da57112
Commit
4da57112
authored
1 month ago
by
Marc DUBOC
Browse files
Options
Downloads
Patches
Plain Diff
Update code matlab
parent
9ea26fb6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
PARTIE3.m
+15
-7
15 additions, 7 deletions
PARTIE3.m
with
15 additions
and
7 deletions
PARTIE3.m
+
15
−
7
View file @
4da57112
...
...
@@ -6,7 +6,7 @@ clear; close all; clc
Fe
=
44100
;
% frequence d echantillonnage
%% ========================================================================
%% Q 3.1 — Correlation croisee R
yx =
R xx * h
%% Q 3.1 — Correlation croisee R R xx * h
% -------------------------------------------------------------------------
dur
=
0.05
;
f0
=
1000
;
t
=
(
0
:
1
/
Fe
:
dur
-
1
/
Fe
)
.'
;
...
...
@@ -36,8 +36,8 @@ title('Q 3.2 Estimation h');
%% ========================================================================
%% Q 3.3 — Choix du meilleur signal d excitation
% -------------------------------------------------------------------------
if
exist
(
'signal
E
xcitation.mat'
,
'file'
)
load
signal
E
xcitation
.
mat
% attend variables xe1, xe2
if
exist
(
'signal
_e
xcitation.mat'
,
'file'
)
load
(
'
signal
_e
xcitation.mat
'
)
% attend variables xe1, xe2
lag
=
1024
;
Rxe1
=
max
(
abs
(
xcorr
(
xe1
,
lag
,
'biased'
)));
Rxe2
=
max
(
abs
(
xcorr
(
xe2
,
lag
,
'biased'
)));
...
...
@@ -51,19 +51,27 @@ end
%% ========================================================================
%% Q 3.4 — Simulation de mesure de piece et estimation de h
% -------------------------------------------------------------------------
if
exist
(
'simulePiece'
,
'file'
)
&&
~
isempty
(
choix
)
[
tensionMicro
,
excitation
]
=
simulePiece
(
choix
);
if
exist
(
'simule_piece.m'
,
'file'
)
&&
~
isempty
(
choix
)
if
strcmp
(
choix
,
'xe1'
)
excitation
=
xe1
;
else
excitation
=
xe2
;
end
tensionMicro
=
simule_piece
(
excitation
,
Fe
);
lag
=
4000
;
hPiece
=
xcorr
(
tensionMicro
,
excitation
,
lag
,
'biased'
);
% Utilisation sans 'biased' car tensionMicro et excitation sont de tailles différentes
hPiece
=
xcorr
(
tensionMicro
,
excitation
,
lag
);
hPiece
=
hPiece
(
lag
+
1
:
end
);
figure
(
'Name'
,
'Q3-4 h piece'
);
plot
(
hPiece
);
grid
on
;
title
(
'Q 3.4 h mesuree'
);
else
warning
(
'Fonction simule
P
iece absente ou signal non choisi — Q 3.4 ignoree'
);
warning
(
'Fonction simule
_p
iece absente ou signal non choisi — Q 3.4 ignoree'
);
hPiece
=
h
;
% secours : reponse test
excitation
=
x
;
% secours : signal test
end
%% ========================================================================
%% Q 3.5 — Fonction effectReverb (convolution directe)
% -------------------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment