This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern float32_t inputSignal[SIG_SAMPLES] = { 2.09186630161801, | |
2.17981806111224, 2.2458345331045, 2.20702098281261, 2.05451765784143, | |
1.85916546584311, 1.7767591356537, 1.79267779175089, 1.85004295412198, | |
1.82818508686074, 1.72760166685638, 1.54716102329878, 1.39328525785108, | |
1.37279362871747, 1.37225304331087, 1.31022305067551, 1.21566162283513, | |
1.24287644762541, 1.38510735478485, 1.60578710124569, 1.93459280511249, | |
2.26110788479076, 2.43559114351632, 2.44546630752519, 2.37477587905096, | |
2.14026122136909, 1.77405580991932, 1.36350765781611, 0.998258176086951, | |
0.77357268824843, 0.567933484496516, 0.384275954063506, | |
0.288059029461084, 0.311287985207322, 0.323805443624895, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% MATLAB Code | |
% Generated by MATLAB(R) 9.9 and Signal Processing Toolbox 8.5. | |
% Generated on: 14-Dec-2020 15:39:25 | |
% Elliptic Lowpass filter designed using FDESIGN.LOWPASS. | |
% All frequency values are in Hz. | |
Fs = 250; % Sampling Frequency | |
Fpass = 3; % Passband Frequency |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
n = 1024; | |
Fs = 250; | |
t = linspace(0,(1/Fs)*n,n)'; | |
x = zeros(n,1); | |
for Fc = [5,25] | |
x = x + sin(2*pi*Fc*t); | |
end | |
L = numel(t); | |
n = (2^nextpow2(L)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extern float32_t inputSignal[FFT_SAMPLES] = { 2, 1.80075512683121, | |
1.27637053325758, 0.618871900194794, 0.0656112591359919, | |
-0.191339455865792, -0.0783815301685531, 0.331835982653282, | |
0.848683105690253, 1.23703243919349, 1.30782963716736, | |
0.991081272267325, 0.363318387328728, -0.380984958988108, | |
-1.00311152015435, -1.31072642475088, -1.23075864316698, | |
-0.836658892316524, -0.319613844304356, 0.085256675713322, | |
0.18946595086915, -0.0761778607350844, -0.634629641347059, | |
-1.29170265140208, -1.81007298891733, -1.99987740193588, | |
-1.79123725544972, -1.26095670117884, -0.603178660320141, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ... application includes here | |
// CMSIS Math includes | |
#include "arm_math.h" | |
#include "arm_const_structs.h" | |
// using a 1024 point signal | |
#define FFT_SAMPLES 1024 | |
#define FFT_SAMPLES_HALF (FFT_SAMPLES / 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = 125; % sampling frequency | |
t = 0 : 1/fs : 5; % time (0-5s) | |
fmod = 2; % Hz | |
x = sin((2*pi*fmod*t) + pi/2); % create test signal | |
% setup plot | |
rows = 4; | |
cols = 1; | |
close all | |
figure('position',[0 0 1000 700]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
close all | |
files = {'/Users/matt/Downloads/Addison_XC31160 - Red-tailed Hawk - Buteo jamaicensis.mp3',... | |
'/Users/matt/Downloads/Chartier_XC401311 - Red-tailed Hawk - Buteo jamaicensis.mp3',... | |
'/Users/matt/Downloads/Wilson_XC53797 - Red-tailed Hawk - Buteo jamaicensis.mp3'}; | |
fileTitles = {'Addison Hawk','Chartier Hawk','Wilson Hawk'}; | |
rows = 3; | |
cols = 4; | |
figure('position',[0,0,1500,900]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
paletteImPath = '~/Downloads/myLittePalette.JPG'; | |
mypal = paletteMaker(paletteImPath); | |
imPath = '~/Downloads/squirrels.JPG'; | |
[im, cmap] = rgb2ind(imread(imPath),256); | |
figure('position',[0 0 1200 800]); | |
subplot(121); | |
imshow(im,cmap); | |
subplot(122); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mypal = paletteMaker(paletteImPath) | |
% input: image path for your palette | |
% output: color palette as a colormap | |
im = imresize(imread(paletteImPath),0.5); | |
figure; | |
imshow(im); | |
[xs,ys,mypal] = impixel(); | |
for iColor = 1:size(mypal,1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
csvPath = "/Users/matt/Documents/MATLAB/Misc/Complete_Pero_Master_1.29.20_dateFMT.csv"; | |
T = readtable(csvPath); | |
% augment table | |
firstCaught = cell(size(T,1),1); | |
lastCaught = firstCaught; | |
% new table | |
new_firstCaught = {}; | |
new_lastCaught = {}; | |
new_mouseID = {}; |