How to fix the axis equal problem (gnuplot version prior to 4.3)?
Use this function instead of the more traditional axis equal
View ArticleHow to enable X11 to plot figures instead of aquaterm (Mac only)?
setenv("GNUTERM", "x11")
View ArticleHow do I convert a byte representation of a number into its decimal...
Let’s consider the case of a standard single precision number (a float) that is represented by 4 bytes. Suppose we want to find the byte hexadecimal representation of x=3.141592. To accomplish this we...
View ArticleHow do I get a fully qualified path in Matlab/Octave?
You can use this one line function (tested only on Unix like systems): For example, suppose that the current directory is /Users/zuliani/Documents/Temp. Then: octave:1> fullpath('.') ans =...
View ArticleHow do I generate an array from the field of a struct array in Matlab/Octave?
Let’s first present the situation. Consider the following code snippet: This code will generate a 100×100 struct array containing the fields uniform and gaussian. Now imagine that you want to extract a...
View ArticleHow do I Initialize a Struct Array in Matlab/Octave?
Suppose that you want to create a 2D array whose entries are the structures: The easiest (in my opinion) way to to this is using the syntax: This will initialize the element (128,128) of a 2D array to...
View ArticleHow do I list the combinations of a set in lexicographical order?
Suppose we have a set composed of elements. Our goal is to list all the possible ways in which we can choose elements in a lexicographical order. Intuitively speaking, we want to postpone as long as...
View Article
More Pages to Explore .....