Rank: 231595 based on 0 downloads (last 30 days) and 0 file submitted
photo

Sebastian Holmqvist

E-mail
Company/University
Chalmers University of Technology
Lat/Long
57.713135, 11.975441

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Sebastian View all
Updated File Comments Rating
14 Aug 2012 multiWaitbar( label, varargin ) A new "shiny" progress-bar with multiple bars in a single window, time-estimates and more. Author: Ben Tordoff

Excellent! It was just what I needed and the example included sets it right up!

09 Aug 2012 LineManipulator Allows mouse-based manipulation of the data of a line object. Author: Thomas Otterstaetter

Also, if you happen to have very uneven axis ranges (one small, one very big), the behaviour can be somewhat odd with the cursor jumping between points seemingly at random.

Try

h = plot(linspace(1,7000,5),linspace(10,30,5)); pathManipulator(h, 'nocheck')

with one axis at 7000 ticks and the other at 5. As you can see, when you try to move one marker past another left/right, the cursor switches to the other marker even though the distance seems fairly large. This does not happen when passing the marker up/down.

My solution is to take the axis ranges into account and scale the vertical and the horizontal distances accordingly before calculating the pythagoras distance.

So swap out all lines

[~,minDistIndex]=min((XData-currentPoint(1,1)).^2+(YData-currentPoint(1,2)).^2);

with

cAxis=[get(axHandle,'XLim') get(axHandle,'YLim')];
xScale = cAxis(2)-cAxis(1);
yScale = cAxis(4)-cAxis(3);
[~,minDistIndex]=min(((XData-currentPoint(1,1))*yScale).^2+((YData-currentPoint(1,2))*xScale).^2);

and it should do the trick.

09 Aug 2012 TCP/IP Socket Communications in MATLAB using Java Classes A simple example TCP/IP server and client using a helper Java class Author: Rodney Thomson

Excellent! Makes a world of difference when handling string > 1 MB. I use Kevin Bartlett's "TCP/IP Communications in Matlab" (http://www.mathworks.se/matlabcentral/fileexchange/24524-tcpip-communications-in-matlab) which can optionally utilize your java classes and it's lizard fast!

08 Aug 2012 LineManipulator Allows mouse-based manipulation of the data of a line object. Author: Thomas Otterstaetter

I believe I found a bug in your latest version.

First off, if a line is initiated (with this script) twice in a row, it's old styling is not recoverable since the Userdata already has been overwritten. That's a minor issue and could be prevented by checking if a line has been initiated and simply do LineManipulator(lineHandle, 'off') before initiating it once more.

The bug however, is when using either 'pushx' or 'pushy'. The pushing part works fine, but the points are unable to move freely in the other direction. So for e.g 'pushx' I simply added

YData(minDistIndex)=currentPoint(1,2);

on line 195. Similarly you add the corresponding piece of code on line 205.

08 Aug 2012 plot_google_map Plot a google map on the background of the current figure using the Static Google Maps API. Author: Zohar Bar-Yehuda

From what I've gathered, Google switched from counting usage per domain to per user instead. So basically if you use Static Maps on your website, a single user using up all of the quota won't affect any other users, only that particular user.

Other than that, great piece of software! It was easy to get compatible with older Matlab (2003) and works like a charm under Matlab R2008b.

As for future requests, caching (i.e renaming and not removing) tiles would be awesome! I realize that storing tiles might violate Google's terms, but temporary would certainly do the trick!

Contact us