TinyURL widget - shorten your URL's for free!

Enter a long URL to make tiny:

Friday, September 19, 2014

How to make clear path lines inside Google Earth paths

If you don't want to see the lines you make in Google Earth, there is little documentation on this aspect. 

I found one simple way to do it.

Select the Path from the Places subtab or inside the right-click menu from the path select the Properties

Then select Style, Color submenu

Then change the line width to zero and it will disappear.




Monday, September 15, 2014

Finding the overall minimum, maximum of an arbitrary matrix in MATLAB and/or Octave.

It's one logical step from what's presented in the GNU Octave Manual, but for a given arbitrary n-dimensional matrix, to find the overall minimum or maximum value within the matrix, you simply recurse the min() or max() function as many times as there are dimensions. So for a 3-dimensional matrix, recurse function calls to min or man three times like this min(min(min(X))))


Example:
 
size(out)
ans = 3 32 32
     min(min(min(out)))
ans = -0.99914
    max(max(max(out)))

    ans = 1











Removing Dimensions from Matrices in Octave or MATLAB - squeeze()

For many math applications you want to run through many variables all at once and gather data. Of course, having several variables that will lead to n-dimensional matrices.

For example I was converting from a spherical coordinate system to a Cartesian and experimenting with what the x,y,z coordinates would be for two changing angles.  This lead to a rank (3 by n by m)  3-dimensional matrix where first dimension is the xyz, the second is angle one and the last is angle two.  To get the matrix for any single variable, do the following: extract a submatrix and then use squeeze to get a single 3 by n or 3 by m matrix.

Example:

Let A = [3*n*m]  say=
size(A) = 3 32 32

a = A(:,1,m)   # takes single dimension matrix from 3*m*n using column one of second dimension

size(a) = 3 1 32

a = squeeze(a) 

size(a) = 3 32

squeeze() looks for the singleton dimension and then does the tedious  matrix copy and paste operations for you.


Of course this gives you one of many, then duplicate for the remainder.

Tuesday, September 9, 2014

Including SVG graphics into LaTeX documents.

The epub book format relies on XHTML / HTML / and MathML for converting from a page-based book like .pdf format or .dvi format into a scaled free-flowing page that can make for reading on a phone, tablet, or any size screen.

I am working on converting my book into XHTML with nice looking graphics.  The first attempts to make a .epub from .pdf caused a mess of a book.  The symbols go all over the page when they aren't locked into position.

The way I solved this was to convert all math equations into graphics - inline and display formulas - and then reinclude graphics into the .tex file rather than equations.

I found the svg package that acts like the graphicsx allowing you to

  \includesvg[<options>]{<svg filename>}
 
include svg image directly.
 
You can find the svg package on CTAN here  
 
 
For Ubuntu and Fedora,  this BASH shellscript should install and reconfigure texmf 

#!/bin/sh
# svg standard install script
# must be run inside the top  svg directory
# must be run as root or sudo root

mkdir /usr/share/texmf/tex/latex/svg
cp -rf * /usr/share/texmf/tex/latex/svg


texhash