-
Recent Posts
Recent Comments
Archives
- March 2020
- May 2019
- December 2018
- June 2018
- December 2017
- October 2017
- July 2017
- June 2017
- May 2017
- March 2017
- February 2017
- January 2017
- August 2016
- July 2016
- May 2016
- April 2016
- March 2016
- February 2016
- December 2015
- November 2015
- September 2015
- August 2015
- July 2015
- June 2015
- April 2015
- March 2015
- February 2015
- January 2015
- November 2014
- October 2014
- September 2014
- August 2014
- July 2014
- June 2014
- May 2014
- April 2014
- March 2014
- February 2014
- January 2014
- December 2013
- November 2013
- October 2013
- September 2013
- August 2013
- July 2013
- June 2013
- May 2013
- April 2013
- March 2013
- February 2013
- January 2013
- December 2012
- November 2012
- October 2012
- September 2012
- August 2012
- July 2012
- June 2012
- May 2012
- April 2012
- March 2012
- February 2012
Categories
-
Join 53 other subscribers
MyCalendar
May 2024 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 Meta
Tag Archives: source
Star / Asterisks Operator ( * ) in Python – 1
1. Unpacking iterables into a list/tuple In addition to serving as the symbol for multiplication, the star operator (*) in Python has several other applications. The first application is unpacking iterables into a list/tuple Example: Adding (appending) elements to an … Continue reading
Posted in Linux, Machine Learning, Python, Software, Ubuntu
Tagged advanced, argument, array, asterisks, code, example, for, function, intermediate, operator, pack, programming, python, sample, script, simple, source, source code, star, step by step, tutorial, unpack
Leave a comment
3D Rotations using Rodrigues Rotation Formula
The problem we are addressing here is the rotation of a general 3D vector about a given axis of rotation denoted by by radians. The Rodrigues Rotation Formula is as follows: Example: for a sanity check we can consider that … Continue reading
Posted in Machine Learning, Robotics
Tagged 2D, 2D rotation, 3d, 3D rotation, axis, axis of rotation, cross product, dot product, easy, example, general rotation, math, mathematics, programming, py, python, Robotics, rodrigues, rodrigues formula, rotation, simple, source, source code, spatial, spatial rotation, tutorial, vector
Leave a comment
Quaternions – Use them for Rotation and Transformation
This is the second tutorial on Quaternions. In the previous post, I explained how to use basics of quaternions from the pyquaternion python library. Check the previous post here. In this post, I will show you how to perform spatial … Continue reading
Posted in Linux, Machine Learning, programming, Python, Robotics, ROS, Software, Ubuntu
Tagged beginner, code, computer, easy, example, function, math, mathematics, matplotlib, matrix, numpy, programming, pyplot, pyquaternion, quaternion, rotation, sample, simple, software, source, source code, spatial rotation, spatial transformation, step by step, transformation, tutorial, vector, windows
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
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
MEX file in MATLAB – Part 1
In this tutorial I will show you a very simple example of a MEX file in MATLAB. A MEX file is a compiled version of a C/C++ code written and compiled in MATLAB that can be used/executed as an M-file. … Continue reading
Posted in C/C++, Linux, MATLAB, programming, Software, Ubuntu
Tagged beginner, c++, code, command line, compile, compiler, cpp, dot, double, easy, example, function, guide, int, language, linux, make, mathworks, Matlab, mex, mexFunction, mwSize, mxArray, mxCreateDoubleMatrix, mxGetN, mxGetPr, performance, product, programming, sample, script, size_t, software, source, sourcecode, step, step by step, tutorial, ubuntu, void, windows
Leave a comment
Investigating code performance in MATLAB – Part 1: For-loop
Here I want to show you a very simple example in MATLAB. Consider we have a large matrix (can be an image also) and we want to perform element-wise operation on the matrix elements. Let’s first create a large matrix: … Continue reading
Posted in Linux, MATLAB, Optimization, programming, Software, Ubuntu
Tagged beginner, call, code, computer, easy, element, example, fix, for, for-loop, function, image, linux, math, mathematics, Matlab, matrix, mean, mean2, mod, optimization, performance, progemming, script, simple, software, source, source code, step by step, tutorial, ubuntu, windows
4 Comments
Update status of your code output in one line (MATLAB)
Consider you want to report the status of your code in the command-line, but you do not want to print a new line each time. For instance, to show the percentage of the progress at the same line from 0%, … Continue reading
Posted in Linux, MATLAB, programming, Software, Ubuntu
Tagged backspace, code, command line, example, fprintf, linux, Matlab, programming, sample, simple, software, source, sourcecode, step by step, tutorial, ubuntu, windows
Leave a comment
Sampling from Normal (Gaussian) Distribution in MATLAB
Sampling from Normal Distribution for a single variable Consider you want to sample 1000 points for a single variable from a normal distribution with mean equal to 5 and standard deviation equal to 1. The easiest way is using normrand … Continue reading
Posted in Linux, Machine Learning, MATLAB, programming, Robotics, Software, Statistics, Ubuntu
Tagged beginner, code, covariance, distribution, easy, example, gaussian, gaussian distribution, linux, math, mathematics, Matlab, mean, mu, normal, normal distribution, programming, sample, sampling, simple, software, source, source code, sourcecode, standard deviation, statistics, std, step by step, tutorial, ubuntu, windows
Leave a comment
Find if an element is repeated exactly m times in a vector
Check if some elements of the vector are repeated exactly m times. To do so, we can use two very useful funcitons, namely ‘unique’ and ‘ismember’. The former creates a new array from the input array including only its unique … Continue reading