diff --git a/Matlab/determineArduinoUnoInterruptSettings.m b/Matlab/determineArduinoUnoInterruptSettings.m
new file mode 100644
index 0000000..afd69d9
--- /dev/null
+++ b/Matlab/determineArduinoUnoInterruptSettings.m
@@ -0,0 +1,50 @@
+## Copyright (C) 2023 Loic
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation, either version 3 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see .
+
+## -*- texinfo -*-
+## @deftypefn {} {@var{retval} =} determineArduinoUnoInterruptSettings (@var{input1}, @var{input2})
+##
+## @seealso{}
+## @end deftypefn
+
+## Author: Loic
+## Created: 2023-04-28
+
+function sol = determineArduinoUnoInterruptSettings (Fs, bitSize)
+
+freqClock = 16*10^6;
+preDiv8 = [1, 8, 64, 256, 1024];
+preDiv16 = [1, 8, 32, 64, 128, 256, 1024];
+if bitSize == 16
+ preDiv = preDiv16;
+elseif bitSize == 8
+ preDiv = preDiv8;
+endif
+
+sol = [];
+itr = 1;
+
+for i = 1:length(preDiv)
+ CMR = freqClock/(preDiv(i)*Fs)-1;
+ if round(CMR)-CMR == 0 && CMR < (2^bitSize -1)
+ CMR
+ sol(itr) = preDiv(i);
+ itr ++;
+ endif
+endfor
+if itr == 1
+ disp("no solution");
+endif
+endfunction
diff --git a/Matlab/testArduinoUnoInterruptSettings.m b/Matlab/testArduinoUnoInterruptSettings.m
new file mode 100644
index 0000000..8fffbd7
--- /dev/null
+++ b/Matlab/testArduinoUnoInterruptSettings.m
@@ -0,0 +1,8 @@
+clear all
+close all
+clc
+
+Fs = 2000; %Hz
+bitSize = 8; %bitset
+
+determineArduinoUnoInterruptSettings (Fs, bitSize)
\ No newline at end of file