Skip to content

Commit 65d2f5b

Browse files
committed
Code Documentation
1 parent ed58175 commit 65d2f5b

12 files changed

Lines changed: 17 additions & 1 deletion

checkAmplitudeDependency.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% Validate whether there is any dependency of the bit allocation problem
2+
% with the amplitude in function 1
13
for i=1:1:10,
24
B = 12379;
35
omega = rand * 10;

checkAmplitudeDependency4.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% Validate whether there is any dependency of the bit allocation problem
2+
% with the amplitude in function 4
13
for i=1:1:10,
24
B = 1024;
35
omega = rand * 10;

checkAnplitudeDependency5.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% Validate whether there is any dependency of the bit allocation problem
2+
% with the amplitude in function 5
13
for i=1:1:10,
24
B = 1024;
35
omega = rand * 10;

checkWnenOmegaIsInteger.m

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
% Validate our assumption in the theoretical part
2+
% that functions 1 and 2 are the same when omega is integer
13
for i=1:1:10,
24
B = 12379;
35
A = rand * 100;

func1Numerically.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
% Numerical calculation of N,b and the mse of function 1
12
function [b,N,mse] = func1Numerically( omega,phi,A,B)
23
syms symb;
34
Energy = 0.5*pi*omega*A^2*(4*pi*omega+sin(4*pi*omega+2*phi)-sin(2*phi));

func2Numerically.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
% Numerical calculation of N,b and the mse of function 2
12
function [b,N,mse] = func2Numerically( omega,phi,A,B)
23
syms symb;
34
Energy = 0.5*pi*omega*A^2*(4*pi*omega-sin(4*pi*omega+2*phi)+sin(2*phi));

func3Numerically.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
% Numerical calculation of N,b and the mse of function 3
12
function [b,N,mse] = func3Numerically(omega,phi,A,alpha,B)
23
syms symb;
34
fun = @(t) (2.*pi.*A.*(omega+2.*alpha.*t).*cos(2.*pi.*t.*(omega+alpha.*t)+phi)).^2;

func4Numerically.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
% Numerical calculation of N,b and the mse of function 4
12
function [b,N,mse] = func4Numerically( omega,phi,A,alpha,B)
23
syms symb;
34
fun = @(t) (2.*pi.*A.*(omega+alpha.^t+t.*alpha.^t-1).*cos(2.*pi.*t.*(omega+alpha.^t-1)+phi)).^2;

func5Numerically.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
% Numerical calculation of N,b and the mse of function 5
12
function [b,N,mse] = func5Numerically( omega,phi,A,alpha,beta,B)
23
syms symb;
34
fun = @(t) (2.*pi.*(beta.*t+A).*(omega+2.*alpha.*t).*cos(2.*pi.*t.*(omega+alpha.*t)+phi)+beta.*sin(2.*pi.*t.*(omega+alpha.*t)+phi)).^2;

mseProject.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
function [mse_error] = mseProject(A,B)
2-
%Calculate the mse error of the matrix
2+
%Calculate the mse error
33

44
difference = double(A)- double(decompress_1d(B,numel(A)));
55
% disp(difference);

0 commit comments

Comments
 (0)