History

Improve octave scripts used for calculating filers.

Erik de Castro Lopo committed 22 years ago

Commit 3770b8e1 parent b9e50b52 files · +6 −6Browse files

Unified · Split

2 files
  1. make_src_filter.m +5 −5
  2. measure_filter.m +1 −1
make_src_filter.m+5−5
@@ -22,12 +22,12 @@ elseif (isstr (filename) == 0), · 21 unmodified lines
2222 fudge_factor1 = 1.0 ;
2323 f1 = generate_filter (cycles, fudge_factor1, increment, atten) ;
2424 [stop_atten stop_band_start1 minus_3db] = measure_filter (f1, atten) ;
25−printf (" fudge_factor : %10.8f stop_band_start : %10.8f 1\n", fudge_factor1, stop_band_start1) ;
25+printf (" fudge_factor : %15.13f stop_band_start : %15.13f 1\n", fudge_factor1, stop_band_start1) ;
2626
2727 fudge_factor2 = 1.25 ;
2828 f2 = generate_filter (cycles, fudge_factor2, increment, atten) ;
2929 [stop_atten stop_band_start2 minus_3db] = measure_filter (f2, atten) ;
30−printf (" fudge_factor : %10.8f stop_band_start : %10.8f 2\n", fudge_factor2, stop_band_start2) ;
30+printf (" fudge_factor : %15.13f stop_band_start : %15.13f 2\n", fudge_factor2, stop_band_start2) ;
3131
3232 f = f1 ;
3333 fudge_factor = fudge_factor1 ;
@@ -35,7 +35,7 @@ stop_band_start = stop_band_start1 ; · 1 unmodified line
3535
3636 while ((stop_band_start1 - stop_band_start2) > 0.00000001)
3737 if (stop_band_start1 < stop_band_start2)
38− printf ("stop_band_start1 < stop_band_start2") ;
38+ printf ("stop_band_start1 < stop_band_start2\n") ;
3939 break ;
4040 endif
4141
@@ -44,7 +44,7 @@ while ((stop_band_start1 - stop_band_start2) > 0.00000001) · 2 unmodified lines
4444 [stop_atten stop_band_start minus_3db] = measure_filter (f, atten) ;
4545
4646 if (stop_band_start > 1.0)
47− printf ("%10.8f %10.8f %10.8f\n", fudge_factor1, fudge_factor, fudge_factor2) ;
47+ printf ("A %10.8f %10.8f %10.8f\n", fudge_factor1, fudge_factor, fudge_factor2) ;
4848 continue ;
4949 endif
5050
@@ -60,7 +60,7 @@ while ((stop_band_start1 - stop_band_start2) > 0.00000001) · 9 unmodified lines
6060 choice = 1 ;
6161 endif
6262
63− printf (" fudge_factor : %10.8f stop_band_start : %10.8f %d\n", fudge_factor, stop_band_start, choice) ;
63+ printf (" fudge_factor : %15.13f stop_band_start : %15.13f %d\n", fudge_factor, stop_band_start, choice) ;
6464 endwhile
6565
6666 printf ("\n") ;
measure_filter.m+1−1
@@ -1,7 +1,7 @@
11 function [stop_atten stop_band_start minus_3db] = measure_filter (f, atten)
22
33
4−spec_len = 200000 ;
4+spec_len = 400000 ;
55
66 # Calculate the spectrum.
77

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t