Login
Password
Sources on this Page

> Headlines by Category

 Home / Science / Mathematics

You are using the plain HTML view, switch to advanced view for a more complete experience.

LL2UTM and UTM2LL

UTM2LL converts Universal Transverse Mercator (UTM) East/North coordinates to latitude/longitude.
LL2UTM converts latitude/longitude coordinates to UTM.
Both functions are using precise formula (millimeter precision), possible user-defined datum (WGS84 is the default), and are all vectorized (no loop in the code). It means that huge matrix of points, like an entire DEM grid, can be converted very fast.

Example (needs readhgt.m author's function):

X = readhgt(36:38,12:15,'merge','crop',[36.5,38.5,12.2,16],'plot');
[lon,lat] = meshgrid(X.lon,X.lat);
[x,y,zone] = ll2utm(lat,lon); % do the job!
z = double(X.z); z(z==-32768 | z<0) = NaN;
figure
pcolor(x,y,z); shading flat; hold on
contour(x,y,z,[0,0],'w')
hold off; axis equal; axis tight
xlabel('East (m)'); ylabel('North (m)')
title(sprintf('Sicily - UTM zone %d WGS84',zone))

loads SRTM full resolution DEM of Sicily in lat/lon (a 2400x4500 grid), converts it to UTM and plots the result with pcolor and contour. To make a regular UTM grid, you may interpolate x and y with griddata function.

See "doc ll2utm" and "doc utm2ll" for syntax and help.

Editor Session Manager

Save the file names and layout of currently open files in the matlab editor as a project workspace session. Different sessions can be saved and loaded.
I often group open files in different tiles in the editor. Switching from Matlab 2008b to 2013b the files from the last time I used matlab would open, but no longer in the correct place in the editor. This submission is the result of 'fixing' the problem also allowing you to open not just what was open last time (if the session was saved), but any set of files from a saved session.

A session also saves the current folder in Matlab (present working directory) and opening a session will automatically change the current folder to it. This lets you open sessions with files in completely different locations while changing the present working directory automatically as well. There is also an option to automatically add sub folders to the path when saving/loading a session. I group files based on similar functions as if it were a package, and adding sub-folders to the path allows me to keep files organized without requiring the naming complexity of packages.

USAGE:
Save the zip file and unzip to somewhere on the matlab path. run editorLayout.createShortcuts() will add shortcuts to load, save, and manage editor sessions.
You can also use the command line directly by calling:
any of editorLayout.SessionEditor.saveSession();
editorLayout.SessionEditor.saveSession('NameOfNewSession');
editorLayout.SessionEditor.openSession();
editorLayout.SessionEditor.manageSessions();

DETAILS:
Adding the shortcuts with createShortcuts will copy the required files to the userpath so that they can be run when just opening matlab. This is necessary if the SessionEditor files were originally stored in a location that is not on the default matlab path when first opening matlab.
The editor sessions, files, and layouts are stored in an xml file in the preferences directory prefdir named 'savedEditorSessions.xml'.

Known Issues:
-Datatips don't seem to appear anymore in the editor (e.g. variable values: can still highlight with F9 to see value; Code anlyzer warnings/error messages: right click or click and press Ctl-M to get the message to appear when hovering over the underlined text)
-The way the layout is restored breaks some functionality in the editor:
Hovering over the tile splitter square doesn't bring up the little x to merge tiles. Workaround: right clicking on it will give you an option to do the same.
-Sometimes dragging files to different tiles after loading a session will leave a blank tile. Work around: put a different file there, or move files to adjacent tiles where there is a tile splitter between them can merge them.

Gaussian Mixture Cardinalized Probability Hypothesis Density Filter

The scripts are used to implement the Gaussian Mixture Cardinalized Probability Hypothesis Density Filter. The algorithm utilized in the code and the tracking scenario follow the paper "Analytic Implementations of the Cardinalized Probability Hypothesis Density Filter" which is published on IEEE Transactions on Signal Proceesing Vol. 55 No. 7. The author are Ba-Ngu Vo and W. K. Ma.

idw.m

function Fint = idw(X,F,p,rad)
Fint = idw(X0,F0,Xint) uses input coordinates X0 and input values F0 where X0 is a N by M input matrix of N samples and M number of variables. F0 is vector of N responses. Xint is a Q by M matrix of coordinates to be interpolated. Fint is the vector of Q interpolated values.

Fint = idw(X0,F0,Xint,p,rad) uses the power p (default p = 2) and radius rad (default rad = inf).

Fint = idw(X0,F0,Xint,p,rad,L) uses L-distance. By defaults L=2 (Euclidean norm).

Example:
X1 = [800;2250;3250;2250;900;500];
X2 = [3700;4200;5000;5700;5100;4900];
F = [13.84;12.15;12.87;12.68;14.41;14.59];
Q = 100;
[X1int,X2int] = meshgrid(0:4000/(Q-1):4000, 3200:(5700-3200)/(Q-1):5700);
Fint = idw([X1,X2],F,[X1int(:),X2int(:)]);
contourf(X1int, X2int, reshape(Fint,Q,Q), 20)

Contact info:
Andres Tovar
tovara@iupiu.edu
Indiana University-Purdue University Indianapolis

Code developed for the course Design of Complex Mechanical Systems (ME 597) offered in Spring 2014

invertir_sonidos.m

Inversión de señales

Equipped with new sensors, Morpheus preps to tackle landing on its own
A test flight later this week will challenge a set of sensors to map out a 65-yard square of boulder-sized hazards and pick out a safe place to land. Mounted to an uncrewed prototype lander called Morpheus that flies autonomously several hundred feet above the ground, the sensor system will have 10 seconds to do its work: six seconds really, as it will take four seconds to map the area before choosing a landing site. The sensor system is a 400-pound set of computers and three instruments called ALHAT, short for Autonomous Landing and Hazard Avoidance Technology.
Re: XLSread does save old content
On 4/24/2014 9:46 AM, Heinz wrote:
> OK
> THERE IS NO PROBLEM
> I made a typo in the beginning of the programming, and therefore always
> opened the same file in same wrong folder. The Foldername was so
> similar, I did not realise that is is a completely different place.
> Sorry Sorry Sorry

Ahhhh...good. I was going to suggest somehow maybe there was a caching
problem w/ the OS not flushing as only explanation I had...

--
Take notes by hand for better long-term comprehension
Dust off those Bic ballpoints and college-ruled notebooks: research shows that taking notes by hand is better than taking notes on a laptop for remembering conceptual information over the long term. "Our new findings suggest that even when laptops are used as intended -- and not for buying things on Amazon during class -- they may still be harming academic performance," says a psychological scientist involved in the study.
Your T-shirt's ringing: Printable tiny flexible cell phones for clothes?
A new version of 'spaser' technology being investigated could mean that mobile phones become so small, efficient, and flexible they could be printed on clothing. A spaser is effectively a nanoscale laser or nanolaser. It emits a beam of light through the vibration of free electrons, rather than the space-consuming electromagnetic wave emission process of a traditional laser.
Re: getting standardize normal probabilities (z score)
On 4/23/2014 8:52 PM, Salvinder wrote:
> "Barry Williams" <barry.r.williamsnospam@saic.com> wrote in message
> <lj84r8$gft$1@newscl01ah.mathworks.com>...
>> "Salvinder " <salvinder@gmail.com> wrote in message
>> <lj7o2j$i5s$1@newscl01ah.mathworks.com>...
>> > I wonder if anyone knows how to do the following.
>> > > Is there a function that could get for me a standardize normal
>> probability from the Z-score obtained by using z_score=zscore(X);
>> > > thanks...
>>
>> Have you looked at pdf and cdf?
>> Barry
>
> The question is:
> Is there a function that could get for me a standardize normal
> probability from the Z-score obtained by using z_score=zscore(X); where
> the X =(x-mean)/std. deviation .... thanks.

AFAIK, all the Matlab functions use the two parameter values as their
inputs, not the standardized z. There's no reason you can't wrap the
appropriate one(s) of them in your own function, however, as "syntactic
sugar".

Seems like a reasonable enhancement request, at least for the Stats Toolbox.

--
Post Selected Items to:

Showing 10 items of about 1600

home  •   advertising  •   terms of service  •   privacy  •   about us  •   contact us design by Popshop •   © 1999-2014 NewsKnowledge