Instantly share code, notes, and snippets.

🌮

# Dhruv ShahPrieureDeSion

🌮
• Sort options
Last active Sep 27, 2018
MDP Planning using Howard's Policy Iteration and as a Linear Program
View MDP_planner.py
 """ File: planner.py Author: Dhruv Ilesh Shah. CS 747, Autumn 2018. Indian Institute of Technology, Bombay. Date created: 8/30/2018 Date last modified: 9/07/2018 Python Version: 2.7.12 This file contains two ways of solving an MDP planning problem: (i) using Howard's PI (Howard, 1960) or (ii) by posing it as a linear program. The PuLP package has been used to solve the linear system
Created May 28, 2018
Compute the restricted isometry constant (RIC) of a matrix at a specified sparsity level. Note that this is a certified NP-hard problem and only computationally tractable for small values of s (upto 4 or 5).
View compute_RIC.m
 function out = compute_RIC(A, s) % This function computes the Restricted Isometry Constant of given matrix A % at sparsity level s. % Written by Alankar Kotwal (alankarkotwal13@gmail.com), Dhruv Shah (dhruv.ilesh@gmail.com) A = normc(A); nT = size(A, 2); combs = combnk(1:nT, s); out = 0; disp(size(combs, 1))
Created Mar 26, 2018
Generate the DTFT of Window Functions in FIR Filter Design
View dtft_fir_filter.m
 %% Discrete time Fourier Transform of FIR filters % Generate the DTFT of Window Functions in FIR Filter Design. For a custom % window, define the window function and use the following snippets as is. % Written by Dhruv Ilesh Shah (dhruv.shah@iitb.ac.in) clear all; close all; N = 100; k = -N:N; hamming_window = 0.54 + (0.46 * cos(2*pi*k / (2 * N))); bartlett_window = 1 - (abs(k) / N);
Last active Apr 11, 2019
ROS Node for converting nav_msgs/odometry messages to nav_msgs/Path
View odom_to_path.py
 #!/usr/bin/env python from __future__ import print_function import rospy from tf.transformations import quaternion_from_euler from std_msgs.msg import String from nav_msgs.msg import Odometry, Path from geometry_msgs.msg import PoseWithCovarianceStamped, PoseStamped from sensor_msgs.msg import Joy import sys import json
Created Feb 24, 2018
Visualise frequency confusing/aliasing due to sampling of a pure sinusoid as a video.
View frequency_confusion.m
 clear all; close all; n = [0:0.1:50]; w = pi/2; Ts = 0.2; ks = [-200:200]; y = zeros(size(n)) frame_count = 1;
Created Nov 24, 2017
Lloyd Max Quantizer for optimal quantization of a random variable demonstrating a Gaussian PDF
View lloyd-max.py
 """ Lloyd Max Quantizer This program implements a midrise lloyd-max quantizer, for optimal quantization of a random variable demonstrating a Gaussian PDF. The clustering mechanism used here equivalent to k-Means clustering. Author: Dhruv Ilesh Shah EE308 - Communication Systems, Autumn 2017 Indian Institute of Technology, Bombay """
Created Nov 7, 2017
View fft_omp.cpp
 # include # include # include # include # include # include using namespace std; int main ( void );
Created Sep 6, 2017