Skip to content

Commit 42040f6

Browse files
committed
fix error in MVDR section
1 parent eda21de commit 42040f6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

content/doa.rst

+1-2
Original file line numberDiff line numberDiff line change
@@ -416,8 +416,7 @@ We can implement the equations above in Python fairly easily:
416416
Rinv = np.linalg.pinv(R) # 3x3. pseudo-inverse tends to work better than a true inverse
417417
418418
w = 1/(a.conj().T @ Rinv @ a) # MVDR equation! denominator is 1x3 * 3x3 * 3x1
419-
metric = metric[0,0] # convert the 1x1 matrix to a Python scalar, it's still complex though
420-
metric = np.abs(metric) # take magnitude
419+
metric = np.abs(w[0,0]) # take magnitude
421420
metric = 10*np.log10(metric) # convert to dB so its easier to see small and large lobes at the same time
422421
results.append(metric)
423422

0 commit comments

Comments
 (0)