Rank: 1790 based on 82 downloads (last 30 days) and 3 files submitted
photo

Luke Winslow

E-mail
Company/University
University of Wisconsin - Madison
Lat/Long
43.09833, -89.40528

Personal Profile:
Professional Interests:
High Throughput Computing, Global Limnology, Geography

 

Watch this Author's files

 

Files Posted by Luke View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
02 Aug 2012 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow logging 41 9
  • 4.8
4.8 | 6 ratings
17 Apr 2012 Matrix Permanent using Ryser Algorithm Matrix permanent calculated using the fast Ryser Algorithm. Author: Luke Winslow permanent, matrix 22 0
04 Mar 2012 Screenshot findDepressions Finds the area coverage and depth of localized depressions on a surface. Author: Luke Winslow earth science, limnology 19 0
Comments and Ratings by Luke View all
Updated File Comments Rating
14 Nov 2012 Matrix Permanent Computation of matrix permanent Author: Changqing Xu

Hey, I wrote a matrix permanent function which is non-recursive and uses the ryser algorithm. It works much better on medium and larger sized matrices. It can be found here: http://www.mathworks.com/matlabcentral/fileexchange/36224-matrix-permanent-using-ryser-algorithm

04 Mar 2012 extrema.m, extrema2.m Search all extrema points of a time series or a surface with/without NaN's. Author: Carlos Adrian Vargas Aguilera

04 Mar 2012 extrema.m, extrema2.m Search all extrema points of a time series or a surface with/without NaN's. Author: Carlos Adrian Vargas Aguilera

01 Jul 2011 Fast points-in-polygon test Fast test to determine points located inside general polygon regions. Should be significantly faster Author: Darren Engwirda

Great and fast little tool. Much faster than matlab inpolygon. My only issue is that I wish it natively understood the typical "GIS" format for polygons which includes a NaN separated list of polygons (NaNs separate the major outline from the 'islands').

Of course you can just handle this with the edges field though, so for future reference, here's my simple create edges code for NaN separated GIS objects. 'shp' variable is n Nx2 matrix of latitudes and longitudes.

shpEnd = find(isnan(shp(:,1)));
shpEnd = vertcat(0,shpEnd);
edges = nan(length(shp(:,1))-length(shpEnd),2);
count = 1;
for j=1:length(shpEnd)-1
endCount = count+length((shpEnd(j)+1:shpEnd(j+1)-2));
edges(count:endCount,:) = [(shpEnd(j)+1:shpEnd(j+1)-2)' ...
(shpEnd(j)+2:shpEnd(j+1)-1)';shpEnd(j+1)-1 shpEnd(j)+1];
count = endCount+1;
end

Comments and Ratings on Luke's Files View all
Updated File Comment by Comments Rating
30 Apr 2014 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow Yibiao

Ah, now it works. This an awesome logger!Thanks Luke!

30 Apr 2014 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow Winslow, Luke

Ah, I see your issue. This doesn't catch *any* error, it only logs errors you specifically send to it using the "L.error" method. You could use a try-catch block to catch the error and then send the text to L.error.

29 Apr 2014 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow Yibiao

Hi Luke, thanks for the reply!

I did double check the spelling and access permission, but just to avoid any mistake I made the path as short as in the code below. After running it, I do see the logfile.txt file generated in H:\.

Here is the code:

clear all;
L = log4m.getLogger('H:\logfile.txt');
L.setLogLevel(L.ALL);
myfunc();

myfunc is a non-existing fucntion, so I get the expected error on command window(in red):

Undefined function or variable 'myfunc'.
Error in Foo (line 4)
myfunc();

But nothing is written into logfile.txt.
Do you have idea what I am doing wrong?

16 Apr 2014 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow Winslow, Luke

Yibiao, I'm not sure. Can you check that you have access rights to that area of the file system? Also, you may want to double-check the path. If you have typos in it, log4m may not give you an error saying it can't write to that area.

16 Apr 2014 log4m - A powerful and simple logger for matlab A simple logger with log4j functionality but designed with the matlab-user in mind. Author: Luke Winslow Yibiao

This looks amazing, but I have trouble making it work:

I put the following code in my "main function":

L = log4m.getLogger('<MyDir>\logfile.txt');
L.setLogLevel(L.ALL);

It does create a logfile.txt in <MyDir>, however, nothing is written to it after I interntionally triggering some errors in my program(I can see the errors on command window).

What am I doing wrong here? Any suggestion would be appreciated!

Contact us