Initial commit

This commit is contained in:
Imants Pulkstenis
2020-02-10 21:40:50 +02:00
parent 16d8573236
commit b6f75f6297
6 changed files with 182 additions and 1 deletions
+6
View File
@@ -0,0 +1,6 @@
function Kcmp = kcmpnd(Ain,Str)
% Kompresora pastiprinajuma koeficients
Kcmp = zeros (size(Ain));
Kcmp(Ain>0)=log10(Str*Ain(Ain>0)+1)./...
Ain(Ain>0)/log10(Str+1);
Kcmp(Ain<=0)=Str/log(Str+1);
+11
View File
@@ -0,0 +1,11 @@
%% % Runas signala komplresors analogajam signalam
Ain = linspace(0,1);
Ktr = kcmpnd(Ain,600);
figure(1)
plot(Ain,Ktr)
Ain = linspace(0,1);
Ktr = kcmpnd(Ain,600);
figure(2)
plot(Ain,Ktr.*Ain)