Rank: 544 based on 150 downloads (last 30 days) and 4 files submitted
Personal Profile:

Professional Interests:
signal processing, oceanography, ocean engineering, sonar

 

Watch this Author's files

 

Files Posted by Val View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 May 2010 Screenshot get_google_map Retrieve a google map from the command line using the Static Google Maps API. Author: Val Schmidt mapping, google, georeferencing, utm, map 65 2
  • 4.0
4.0 | 1 rating
03 Jan 2010 Screenshot raytrace A function to model acoustic refraction due to variations in sound speed. Author: Val Schmidt ray tracing, refraction, ocean engineering, modeling, underwater acoustics, acoustics 38 0
24 Jun 2009 struct_read/struct_write Functions to ease the reading and writing of C data structures from and to binary files. Author: Val Schmidt writing, reading, file, binary, c, gps 11 0
07 May 2009 Convert Unix Time (seconds since Jan 1 1970) to MATLAB Serial Time Converts unix time to MATLAB serial time. Author: Val Schmidt unix, data processing, unix time, serial time 36 0
Comments and Ratings by Val View all
Updated File Comments Rating
10 May 2010 MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support Beats MATLAB 300% - 400% in some cases ... really! Author: James Tursa

Never mind, I found my problem. I have not successfully built mtimesx on Snow Leopard 10.6 with 64 bit MATLAB.

To do so I edited
/Applications/MATLAB_R2009b.app/bin/gccopts.sh
In the section for "maci64" I changed "SDKROOT" and "MACOSX_DEPLOYMENT_TARGET" to reflect a change in OS from 10.5 to 10.6.

Then I selected this opts file with
mex -setup
selecting "1" at the prompt.

Then I compiled everything with:
mex -v -DDEFINEUNIX -largeArrayDims mtimesx.c -lmwblas -lmwlapack

(look out for the 2 D's in -DDEFINEUNIX - that was my error)

10 May 2010 MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support Beats MATLAB 300% - 400% in some cases ... really! Author: James Tursa

I'm trying to compile on 64bit MATLAB on Mac OSX 10.6 without success. The only changes I've made to the default have been to modify the MATLABROOT/bin/gccopts.sh file such that the SDK and OS Version are set to the 10.6 variety. (and then ran mex -setup)

It seems the linker cannot find the linear algebra packages, but it is not clear to me why. The output is below and I would be thankful for ideas on what to try next.

thanks

---------------snip------------
-> gcc-4.0 -O -Wl,-twolevel_namespace -undefined error -arch x86_64 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.6.sdk -mmacosx-version-min=10.6 -bundle -Wl,-exported_symbols_list,/Applications/MATLAB_R2009b.app/extern/lib/maci64/mexFunction.map -o "mtimesx.mexmaci64" mtimesx.o -L/Applications/MATLAB_R2009b.app/bin/maci64 -lmx -lmex -lmat -lstdc++

Undefined symbols:
  "_dsyr2k", referenced from:
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
  "_dgemm", referenced from:
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
  "_dgemv", referenced from:
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
  "_sgemm", referenced from:
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
  "_sgemv", referenced from:
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
  "_dsyrk", referenced from:
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
      _DoubleTimesDouble in mtimesx.o
  "_ssyrk", referenced from:
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
  "_ssyr2k", referenced from:
      _FloatTimesFloat in mtimesx.o
      _FloatTimesFloat in mtimesx.o
  "_sdot", referenced from:
      _floatcomplexdotproduct in mtimesx.o
      _floatcomplexdotproduct in mtimesx.o
      _floatcomplexdotproduct in mtimesx.o
      _floatcomplexdotproduct in mtimesx.o
      _floatcomplexdotproduct in mtimesx.o
  "_ddot", referenced from:
      _doublecomplexdotproduct in mtimesx.o
      _doublecomplexdotproduct in mtimesx.o
      _doublecomplexdotproduct in mtimesx.o
      _doublecomplexdotproduct in mtimesx.o
      _doublecomplexdotproduct in mtimesx.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

    mex: link of ' "mtimesx.mexmaci64"' failed.

26 Apr 2010 MTIMESX - Fast Matrix Multiply with Multi-Dimensional Support Beats MATLAB 300% - 400% in some cases ... really! Author: James Tursa

James,
This is code is proving to be a FANTASTIC speed up to my work. I am so grateful that I thought I would post and comment.

First, I am working on R2008b on an intel mac. I compiled your code with

 mex -DEFINEUNIX mtimesx.c

and although I received a handful of warnings about redefined pointers, it compiled fine without error. I also tried compiling the code with a few extra optimizations, out of curiosity:

 mex -DEFINEUNIX CFLAGS = '$CFLAGS -O3 -funroll-loops -fexpensive-optimizations -ffast-math' mtimesx.c

The result wasn't significantly faster than the original on my own processing test (I did not take the time to run it through your tests, however.).

I did run mtimesx_test_ddspeed initially to compare with MATLAB native routines, and while I didn't capture the results, I found that most things native MATLAB could do as fast or faster than mtimesx, with the notable exception of math involving complex conjugates, in which mtimesx was far, far faster.

However, the fantastic benefit for me was the native handling of 4D matrices by mtimesx. In my own code in which I am rotating several (8.3) million 3D vectors through a 3x3 rotation matrices, mtimesx increased the speed of my calculations 2100%!

Thanks so much for your time and effort. It is most gratefully appreciated.

-Val

05 Aug 2009 txt2mat fast and versatile ascii data import capable of handling large text files Author: Andres

This seems like a terrifically useful tool.

One feature request. In addition to being able to specify characters that, if found in a line, mark the line for omission, it would be nice to be able to instead skip everything by default and specify characters of lines that are to be included.

Suppose, for example, you want to parse a log file. You'll want to extract all the log entries of a particular type. Rather than having to specify every other type of entry for omission, it'd be nice to be able to specify just the ones you want.

Thanks,
Val

21 Jun 2009 xml_io_tools Read XML files into MATLAB struct and writes MATLAB data types to XML Author: Jaroslaw Tuszynski

This package works well for us - reading xml that fails under other xml packages.

However it is EXTREMELY slow (for me).

In parsing a 976K xml file with a parent function that calls xml_read(), I find in profiling that "xml_read>DOMnode2struct" consumes 206 seconds of the total 210.

It appears that the process of unwrapping the results of the DOM object into the matlab structure is what kills it. Oddly, my cpu is rarely maxed out, which seems to indicate some memory management bottleneck.

Is there any chance this is fixable?

Comments and Ratings on Val's Files View all
Updated File Comment by Comments Rating
22 Sep 2009 get_google_map Retrieve a google map from the command line using the Static Google Maps API. Author: Val Schmidt kumar, brijendra

i am getting following error........
please help me to fix it..................
################
??? Error using ==> imread at 328
Unable to determine the file format.

Error in ==> get_google_map at 163
[M Mcolor] = imread(filename);

Error in ==> Untitled2 at 3
[xx yy M Mcolor] = get_google_map(43.06374,-70.703993);

14 May 2009 get_google_map Retrieve a google map from the command line using the Static Google Maps API. Author: Val Schmidt us

once the user has set the environment

- get the KEY
- get DEG2UTM

it works quite well for most of the prop/val combinations

two thoughts

no need to FLIPUD(M) in the function... otherwise, users have to flip it back for

     imagesc(XX,YY,flipud(M));
     colormap(Mcolor);
     axis image;

which seems a faster/better way to display the map compared to the proposed SURF(...)

the props should be case-insensitive...

us

Top Tags Applied by Val
acoustics, binary, c, data processing, file
Files Tagged by Val View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
11 May 2010 Screenshot get_google_map Retrieve a google map from the command line using the Static Google Maps API. Author: Val Schmidt mapping, google, georeferencing, utm, map 65 2
  • 4.0
4.0 | 1 rating
03 Jan 2010 Screenshot raytrace A function to model acoustic refraction due to variations in sound speed. Author: Val Schmidt ray tracing, refraction, ocean engineering, modeling, underwater acoustics, acoustics 38 0
24 Jun 2009 struct_read/struct_write Functions to ease the reading and writing of C data structures from and to binary files. Author: Val Schmidt writing, reading, file, binary, c, gps 11 0
07 May 2009 Convert Unix Time (seconds since Jan 1 1970) to MATLAB Serial Time Converts unix time to MATLAB serial time. Author: Val Schmidt unix, data processing, unix time, serial time 36 0

Contact us at files@mathworks.com