Category Archives: MATLAB

Linear Transformation of Random Variables

Linear Transformation of Random Variables is a very basic yet important operation in Statistics results of which are extensively used in different methods and algorithms in Machine Learning. Assume is a linear function, , where, is a random variable, and … Continue reading

Posted in Machine Learning, MATLAB, Robotics, Statistics | Tagged , , , , , , , , , , , , , , | Leave a comment

Importance Sampling – A Tutorial

Problem: Compute an expectation over a probability density function , given only samples generated from a different probability density function . We call and the target distribution and proposal distribution respectively. Solution: Draw samples from Calculate the probability of each … Continue reading

Posted in Machine Learning, MATLAB, Optimization, Reinforcement Learning, Robotics, Software, Statistics | Tagged , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Generating a trajectory of quaternions between two given quaternions

First, check my previous post on slerp to learn how to interpolate between two quaternions. In this post, we make a function that uses the previously developed interpolation to generate points (quaternions) between and initial and a final quaternion namely, … Continue reading

Posted in control, Linux, Machine Learning, MATLAB, programming, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , , , | Leave a comment

Slerp: Spherical linear interpolation in quaternion space

in my previous post, I explained the simple Lerp method for calculating linear interpolation in the quaternion space. I also mentioned that while normalizing the output could help to get an optimized result, the velocity curve is not constant. To … Continue reading

Posted in Linux, Machine Learning, MATLAB, Optimization, programming, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Lerp: Linear interpolation in quaternion space

Lerp stands for Linear interpolation. It is method for linearly interpolate between quaternions. Consider and as two quaternions and . Lerp works as follows: The interpolation curve for the linear interpolation (Lerp) gives a straight line in quaternion space and … Continue reading

Posted in Linux, Machine Learning, MATLAB, Optimization, Robotics, ROS, Software, Ubuntu, Uncategorized | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Compress files in MATLAB without other file compression software – Method 3, tar & untar

In the previous post and the post before that, I mentioned two methods for compressing and decompressing files directly in MATLAB using standard ZIP and GNU ZIP methods. In this folder, I demonstrate that we can make tar files using … Continue reading

Posted in Linux, MATLAB, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Compress files in MATLAB without other file compression software – Method 2, GNU ZIP-UNZIP

In previous post, I showed how you can make zip files in MATLAB and also how to unzip them. The previous function zip used the standard ZIP compression. In this post, we take a look at GNU ZIP and GNU … Continue reading

Posted in Linux, MATLAB, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Compress files in MATLAB without other file compression software – Method 1, ZIP-UNZIP

You can easily zip a file (or a set of files) in MATLAB without requiring any external compression software being installed on your machine. This is useful to be able to compress files while still in MATLAB. In this post, … Continue reading

Posted in Linux, MATLAB, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Argument handling in MATLAB functions – using default values

When writing functions in MATLAB sometimes the function requires a number of arguments some of which can have default values. So when the arguments are given, they overwrite the default arguments. Consider the following example: First of all, we can … Continue reading

Posted in Linux, MATLAB, programming, Software, Ubuntu | Tagged , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Iterative Learning Control – Part 2

In the previous post I explained the ILC controllers and compared them to the conventional feedback controllers. In this post I show a simple example that employs an ILC. Check the following simple, linear plant: In this system, is the … Continue reading

Posted in control, Machine Learning, MATLAB, Optimization, programming, Robotics, Software | Tagged , , , , , , , , , , , , , , , , , , | 3 Comments