Software Listing of Author : "Nathan Tomlin"
- DAQmx examples
- License: Shareware
- Price:


Examples of using matlab to talk to a National Instruments (NI) DAQ card _without_ the 'data acquisition toolbox' I have mainly used code and examples from Jens Roesner here: http://www.jr-worldwi.de/work/matlab/index.html However, I had to make a few slight tweaks to get it to work for me. I have only tested this on Matlab 7.8.0 (R2009a) on WinXP with a NI PCI 6220 board, so no guarantees. Using Jens' code, I got an error -200088 whenever I tried to create a channel. To get it working, I had to change the initial task handles to uint32([]) which then returned a pointer for taskhandle I also had trouble with creating tasks, then losing the taskhandle, and not being able to create the same task because of a name conflict. The solution is to not name any of the tasks - names don't seem to be useful anyway. So all my functions pass an...
- Publisher: Nathan Tomlin
- Date Released: 17-03-2013
- Download Size: 41 KB
- Download
- Platform: Matlab, Scripts
- Fix bounding box in MATLAB exported encapsulated postscript (.eps) files
- License: Shareware
- Price:


I found that the bounding box on matlab exported eps files was too large on the left and right side. This script just reads in the .eps file and reduces the bbox. % matlab seems to compute a bounding box on eps files which is too % large in the x-direction % % this script fixes the bounding box. % it is 99% stolen from fixeps.m, located here: % http://www.mathworks.com/matlabcentral/fil...objectType=file % the only change is that this actually changes the bbox numbers % seriously, the only change is the addition of lines 19,20,31,32 % % boundingbox has form of: % %%BoundingBox: x1 y1 x2 y2 % where (x1,y1) is lower-left and (x2,y2) is upper-right % % matlab computes x1 too small and x2 too large
- Publisher: Nathan Tomlin
- Date Released: 09-02-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- LabJackU3
- License: Freeware
- Price: 0.00


Must have MATLAB_LJUD.zip file from http://labjack.com/support/ud/examples/matlab and 'LJUD_Functions' folder must be on path or in the current directory inputs: op operation to perform, options are: temperature - read internal temp in Kelvin AnalogIn,N read single-ended analog input from channel N AnalogInDiff,N1,N2 read differential analog input from channels: N1-N2 AnalogOut,N1,N2 set analog output channel N1 (0 or 1) to voltage N2 DigitalIn,N - read 0 or 1 on channel N DigitalOut,N1,N2 set channel N1 to digital value N2 (0 or 1) StreamAnalogIn,N1,N2,N3 stream from channel N1 (can be array of multiple channels) at rate N2 samples/sec for total of N3 seconds varargin - currently no options examples: T = LabJackU3('temperature') return internal temperature V2 = LabJackU3('AnalogIn',2) return AIN2-GND voltage V6to5 =...
- Publisher: Nathan Tomlin
- Date Released: 09-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- nonduplicate
- License: Freeware
- Price: 0.00


Fixes x data so that interp1 doesn't return error: 'The values of X should be distinct.' Checks for duplicate values in input 1D data array and returns array where all values are distinct. If duplicates are found, values are separate by small value (eps). useage: x = nonduplicate(x); yi = interp1(nonduplicate(x),y,xi) Example: interp1([1,1,2],[1,1,2],1.5) returns an error. interp1(nonduplicate([1,1,2]),[1,1,2],1.5) works just fine.
- Publisher: Nathan Tomlin
- Date Released: 26-01-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts
- rename_files_by_age
- License: Shareware
- Price:


Automatically rename files by age from a set date. I use it to date pictures and videos of my kid. % function rename_files_by_age() % % function to automatically rename pictures and videos to start with age % from specified date. Written for baby pictures. % Change name to from 'foo' to '##Y##M##D_foo' % ie - 'foo.jpg' to '01Y03M10D_foo.jpg' if pic taken 1 year, 3 months, 10 % days after birth % % I tried to keep it simple, so I just copy it into a folder with files I % want to rename and then run it % I put all video files in a subfolder called 'videos' % change variable folder_videos below if you do something different % % my files came from many different sources % (iPhone, android phone, multiple cameras, ipcamera) % and they don't all have the same info, so here's what I came up with % for *.jpg pictures: % - I try exifread to...
- Publisher: Nathan Tomlin
- Date Released: 09-06-2013
- Download Size: 10 KB
- Download
- Platform: Matlab, Scripts