Skip to content

Commit 3f5158f

Browse files
committed
Update README.md
1 parent 03139a5 commit 3f5158f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ double samplePeriod = sampleRate / 1000.0;
3838
ScottPlot.Plot plt = new();
3939
plt.Add.Signal(signal, samplePeriod);
4040
plt.YLabel("Amplitude");
41-
plt.SavePng("time-series.png",500,200);
41+
plt.SavePng("time-series.png", 500, 200);
4242
```
4343

4444
<div align="center">
@@ -64,11 +64,11 @@ double[] psd = FftSharp.FFT.Power(spectrum);
6464
double[] freq = FftSharp.FFT.FrequencyScale(psd.Length, sampleRate);
6565

6666
// plot the sample audio
67-
ScottPlot.Plot plt = new ScottPlot.Plot();
67+
ScottPlot.Plot plt = new();
6868
plt.Add.ScatterLine(freq, psd);
6969
plt.YLabel("Power (dB)");
7070
plt.XLabel("Frequency (Hz)");
71-
plt.SavePng("periodogram.png",500,200);
71+
plt.SavePng("periodogram.png", 500, 200);
7272
```
7373

7474
<div align="center">
@@ -90,7 +90,7 @@ System.Numerics.Complex[] buffer =
9090
new(real: 99, imaginary: 78),
9191
};
9292

93-
FftSharp.Transform.FFT(buffer);
93+
FftSharp.FFT.Forward(buffer);
9494
```
9595

9696
## Filtering
@@ -99,7 +99,7 @@ The `FftSharp.Filter` module has methods to apply low-pass, high-pass, band-pass
9999

100100
```cs
101101
double[] audio = FftSharp.SampleData.SampleAudio1();
102-
double[] filtered = FftSharp.Filter.LowPass(audio, sampleRate, maxFrequency: 2000);
102+
double[] filtered = FftSharp.Filter.LowPass(audio, sampleRate: 48000, maxFrequency: 2000);
103103
```
104104

105105
<div align="center">

0 commit comments

Comments
 (0)