Skip to content

Commit 5eb3cbf

Browse files
committed
Dependencies Check
1 parent ae5ad2e commit 5eb3cbf

6 files changed

Lines changed: 76 additions & 4 deletions

checkAmplitudeDependency.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
for i=1:1:10,
2+
B = 12379;
3+
omega = rand * 10;
4+
phi = rand*2*pi;
5+
alpha = rand * 10;
6+
[b_org,N_org,] = func3Numerically( omega,phi,1,alpha,B);
7+
for j=10:10:100,
8+
[b,N,] = func3Numerically( omega,phi,j,alpha,B);
9+
if abs(b-b_org)>0.001
10+
disp('Dependent !!!');
11+
end
12+
end
13+
fprintf('done: %d \n',i);
14+
end
15+

checkAmplitudeDependency4.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
for i=1:1:10,
2+
B = 1024;
3+
omega = rand * 10;
4+
phi = rand*2*pi;
5+
alpha = rand * 10;
6+
[b_org,N_org,] = func4Numerically( omega,phi,1,alpha,B);
7+
for j=10:10:100,
8+
[b,N,] = func4Numerically( omega,phi,j,alpha,B);
9+
if abs(b-b_org)>0.001
10+
disp('Dependent !!!');
11+
end
12+
end
13+
fprintf('done: %d \n',i);
14+
end
15+

checkAnplitudeDependency5.m

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
for i=1:1:10,
2+
B = 1024;
3+
omega = rand * 10;
4+
phi = rand*2*pi;
5+
alpha = rand * 10;
6+
beta = rand * 10;
7+
[b_org,N_org,] = func5Numerically( omega,phi,1,alpha,beta,B);
8+
for j=10:10:100,
9+
[b,N,] = func5Numerically( omega,phi,j,alpha,beta,B);
10+
if abs(b-b_org)>0.001
11+
disp('Dependent !!!');
12+
end
13+
end
14+
fprintf('done: %d \n',i);
15+
end
16+

checkWnenOmegaIsInteger.m

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
for i=1:1:10,
2+
B = 12379;
3+
A = rand * 100;
4+
phi = rand*2*pi;
5+
omega = rand * 100;
6+
omega_floor = floor(omega);
7+
if abs(func1Numerically(omega_floor,phi,A,B)- func2Numerically(omega_floor,phi,A,B))>0.001
8+
disp('false !');
9+
end
10+
if abs(func1Numerically(omega,phi,A,B)- func2Numerically(omega,phi,A,B))>0.001
11+
disp('correct !');
12+
end
13+
fprintf('Done : %d \n',i);
14+
end
15+

checkWnenOmegaIsInteger.m~

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
for i=1:1:10,
2+
B = 12379;
3+
A = rand * 100;
4+
phi = rand*2*pi;
5+
alpha = rand * 10;
6+
for j=10:10:100,
7+
omega = rand * 10;
8+
[b,N,] = func3Numerically( omega,phi,j,alpha,B);
9+
if abs(b-b_org)>0.001
10+
disp('Dependent !!!');
11+
end
12+
end
13+
fprintf('done: %d \n',i);
14+
end
15+

func1Numerically.m~

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)