Skip to content

Instantly share code, notes, and snippets.

View tanweer-mahdi's full-sized avatar
🧩
~ i know the pieces fit ~

Shah Mahdi Hasan tanweer-mahdi

🧩
~ i know the pieces fit ~
View GitHub Profile
@tanweer-mahdi
tanweer-mahdi / random_svd_example.m
Created September 30, 2020 01:24
A small example of randmized singular value decompostion (SVD)
clc;
close all;
clear all;
%% Creating a large dataset
measurement = 9000:3000:24000;
lp = length(measurement);
dtime = zeros(lp,1);
derror = zeros(lp,1);
rtime = zeros(lp,3);
@tanweer-mahdi
tanweer-mahdi / fft_sample.m
Last active April 15, 2020 06:36
A sample code detailing end-to-end FFT operation
clear;
clc;
Fs = 1000; %sampling rate
T = 1/Fs; %sampling interval
L = 500; %Number of time points
t = 0:T:(L-1)*T; %time vector
N = 1024; %FFT points
% Define frequencies
f1 = 20;
f2 = 220;