Skip to content

Commit 2032980

Browse files
authored
Merge pull request #2 from leios/jie-line-fix
fixing line numbers for jie's PR
2 parents 7eab3b7 + e999892 commit 2032980

File tree

1 file changed

+6
-6
lines changed
  • contents/convolutions/1d

1 file changed

+6
-6
lines changed

contents/convolutions/1d/1d.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ With this in mind, we can almost directly transcribe the discrete equation into
5353

5454
{% method %}
5555
{% sample lang="jl" %}
56-
[import:29-48, lang:"julia"](../code/julia/1d_convolution.jl)
56+
[import:27-46, lang:"julia"](../code/julia/1d_convolution.jl)
5757
{% endmethod %}
5858

5959
The easiest way to reason about this code is to read it as you might read a textbook.
@@ -184,30 +184,30 @@ Here it is again for clarity:
184184

185185
{% method %}
186186
{% sample lang="jl" %}
187-
[import:29-48, lang:"julia"](../code/julia/1d_convolution.jl)
187+
[import:27-46, lang:"julia"](../code/julia/1d_convolution.jl)
188188
{% endmethod %}
189189

190190
Here, the main difference between the bounded and unbounded versions is that the output array size is smaller in the bounded case.
191191
For an unbounded convolution, the function would be called with a the output array size specified to be the size of both signals put together:
192192

193193
{% method %}
194194
{% sample lang="jl" %}
195-
[import:60-61, lang:"julia"](../code/julia/1d_convolution.jl)
195+
[import:58-59, lang:"julia"](../code/julia/1d_convolution.jl)
196196
{% endmethod %}
197197

198198
On the other hand, the bounded call would set the output array size to simply be the length of the signal
199199

200200
{% method %}
201201
{% sample lang="jl" %}
202-
[import:63-64, lang:"julia"](../code/julia/1d_convolution.jl)
202+
[import:61-62, lang:"julia"](../code/julia/1d_convolution.jl)
203203
{% endmethod %}
204204

205205
Finally, as we mentioned before, it is possible to center bounded convolutions by changing the location where we calculate the each point along the filter.
206206
This can be done by modifying the following line:
207207

208208
{% method %}
209209
{% sample lang="jl" %}
210-
[import:37-37, lang:"julia"](../code/julia/1d_convolution.jl)
210+
[import:35-35, lang:"julia"](../code/julia/1d_convolution.jl)
211211
{% endmethod %}
212212

213213
Here, `j` counts from `i-length(filter)` to `i`.
@@ -239,7 +239,7 @@ In code, this typically amounts to using some form of modulus operation, as show
239239

240240
{% method %}
241241
{% sample lang="jl" %}
242-
[import:4-27, lang:"julia"](../code/julia/1d_convolution.jl)
242+
[import:4-25, lang:"julia"](../code/julia/1d_convolution.jl)
243243
{% endmethod %}
244244

245245
This is essentially the same as before, except for the modulus operations, which allow us to work on a periodic domain.

0 commit comments

Comments
 (0)