# Corner frequency cannot be set when using Moku:Go's lock-in amp function with matlab

**URL:** https://forum.liquidinstruments.com/t/corner-frequency-cannot-be-set-when-using-moku-gos-lock-in-amp-function-with-matlab/801
**Category:** Software & APIs
**Created:** [September 6, 2023, 3:08am UTC](https://forum.liquidinstruments.com/t/corner-frequency-cannot-be-set-when-using-moku-gos-lock-in-amp-function-with-matlab/801 "2023-09-06T03:08:14Z")
**Posts on this page:** 1
**Showing post:** 1

<div class="post-metadata">

### Author: ![GeorgeSato](https://avatars.discourse-cdn.com/v4/letter/g/90db22/32.png) [@GeorgeSato](https://forum.liquidinstruments.com/u/GeorgeSato)
#### Post date: [September 6, 2023, 3:08am UTC](https://forum.liquidinstruments.com/t/corner-frequency-cannot-be-set-when-using-moku-gos-lock-in-amp-function-with-matlab/801/1 "2023-09-06T03:08:14Z")

</div>

An error occurs when using the instruction statement set\_filter in the sample program lock\_in\_amplifier\_basic.m using the lock-in amplifier function in matlab on the LIQUID INSTRUMENT website. The error is as follows.

Unable to set corner\_frequency to desired value.

The coerced value depends on the corner frequency to be set, but no matter what value is set, an error occurs. I would like to know how to solve this error, as I am not familiar with English.

Finally, a sample program for this error is shown below.

%% Basic Lock-in Amplifier Example  
%  
% This example demonstrates how you can configure the Lock-in Amplifier  
% instrument to demodulate an input signal from Input 1 with the reference  
% signal from the Local Oscillator to extract the X component and generate  
% a sine wave on the auxiliary output  
%  
% (c) 2022 Liquid Instruments Pty. Ltd.  
%

%% Connect to your Moku  
% Connect to your Moku by its IP address and deploy the Lock-in Amplifier  
% instrument.  
i = MokuLockInAmp(‘My IPaddress’,force\_connect=‘true’);

try  
%% Configure the instrument

```
% Configure the frontend
% Channel 1 DC coupled, 1 Mohm impedance, and 400 mVpp range
i.set_frontend(1, 'DC', '1MOhm','0dB');
%i.set_frontend(1, impedance="1MOhm", coupling="DC", attenuation="0dB");
% Channel 2 DC coupled, 1 Mohm impedance, and 4 Vpp range
i.set_frontend(2, 'DC', '1MOhm','-14dB');
%i.set_frontend(2, impedance="1MOhm", coupling="DC", attenuation='-20dB');

% Configure the demodulation signal to Local oscillator with 1 MHz and
% 0 degrees phase shift
i.set_demodulation('Internal','frequency',1e6,'phase',0);

%disp(i.summary());
% Set low pass filter to 1 kHz corner frequency with 6 dB/octave slope
i.set_filter(1000,'slope','Slope6dB');

% Configure output signals
% X component to Output 1 
% Aux oscillator signal to Output 2 at 1 MHz 500 mVpp
i.set_outputs('X','Aux');
i.set_aux_output(1e6,0.5);

```

catch ME  
% End the current connection session with your Moku  
i.relinquish\_ownership();  
rethrow(ME)  
end

i.relinquish\_ownership();

---

_[View the full topic](https://forum.liquidinstruments.com/t/corner-frequency-cannot-be-set-when-using-moku-gos-lock-in-amp-function-with-matlab/801)._
