Skip to content

Commit 3f02473

Browse files
committed
DOC: plot of logarithmically spaced linear array
1 parent 5156b9a commit 3f02473

File tree

3 files changed

+34
-0
lines changed

3 files changed

+34
-0
lines changed

doc/img/generate_plots.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@
1313
pause(1)
1414
print_png('secondary_sources_linear.png');
1515

16+
conf.secondary_sources.logspread = 3.5;
17+
x0 = secondary_source_positions(conf);
18+
figure;
19+
figsize(540,404,'px');
20+
draw_loudspeakers(x0,conf);
21+
axis([-2 2 -2 1]);
22+
pause(1)
23+
print_png('secondary_sources_linear_log.png');
24+
1625
% === circular ===
1726
conf.secondary_sources.geometry = 'circle';
1827
conf.secondary_sources.number = 56;
6.71 KB
Loading

doc/secondary-sources.rst

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,31 @@ Linear array
3636

3737
Linear loudspeaker array with a length of 3m consiting of 21 loudspeakers.
3838

39+
You can also create logarithmic spacing for a linear array setting
40+
``conf.secondary_sources.logspread`` different from its default value of
41+
``1.0``. For values smaller than 1 the secondary sources will be more dense at
42+
the edges of the array, whereas for larger values they will be more dense at the
43+
center.
44+
45+
.. sourcecode:: matlab
46+
47+
conf = SFS_config;
48+
conf.secondary_sources.geometry = 'line';
49+
conf.secondary_sources.number = 21;
50+
conf.secondary_sources.logspread = 3.5;
51+
x0 = secondary_source_positions(conf);
52+
figure;
53+
figsize(504,404,'px');
54+
draw_loudspeakers(x0,conf);
55+
axis([-2 2 -2 1]);
56+
%print_png('img/secondary_sources_linear_log.png');
57+
58+
.. figure:: img/secondary_sources_linear_log.png
59+
:align: center
60+
61+
Linear loudspeaker array with a length of 3m consiting of 21 logarithmically
62+
spaced loudspeakers.
63+
3964
Circular array
4065
--------------
4166

0 commit comments

Comments
 (0)