Rank: 31 based on 773 downloads (last 30 days) and 53 files submitted
photo

Brett Shoelson

E-mail
Company/University
MathWorks
Lat/Long
38.87422943115234, -77.1302490234375

Personal Profile:

I'm a biomedical engineer by training, but I love MATLAB and have worked as a Principal Application Engineer for MathWorks since 2005. I also co-write the Pick of the Week blog, with my friend Jiro.

Professional Interests:
(medical) image processing

 

Watch this Author's files

 

Files Posted by Brett View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Jan 2012 Screenshot Primer Design GUI A GUI for designing primers Author: Brett Shoelson primer design, genbank, bioinformatics, dna synthesis 34 0
23 Jan 2012 Screenshot markPoints Manually mark and count objects in an image. Author: Brett Shoelson count objects regions... 30 0
23 Jan 2012 Screenshot edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson edf european data for... 29 1
  • 5.0
5.0 | 1 rating
05 Oct 2011 nancumsum Compute the cumulative sum of matrices, specifying the treatment of NaNs. Author: Brett Shoelson nan, cumulative, sum, cumsum 20 2
  • 5.0
5.0 | 2 ratings
05 Oct 2011 nancumprod Compute the cumulative product of matrices, specifying the treatment of NaNs. Author: Brett Shoelson nan, cumulative, prod, cumprod 0 7
  • 5.0
5.0 | 1 rating
Comments and Ratings by Brett View all
Updated File Comments Rating
12 Jan 2012 draggable Allows graphical objects to be dragged in a figure. Author: Francois Bouffard

Most excellent work...rock solid!

25 Oct 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson

recep, Kelly, et al: I see what's happening now. I provided auxiliary files in a folder, assuming that they would be put on your MATLAB path. You can either add those folders manually to the path, or drag the files out of the folders, or issue this (or equivalent) command:

addpath(genpath(fileparts(which('MorphTool.m'))))

Let me know if that addresses the issue, please.

25 Oct 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson

@recep and Kelly: Would you please verify that you have the latest version, and that it came with the TabPanel function? If not, please grab the new version. If so, it would help if you could tell me reproduction steps that trigger the problem.
Thanks, Brett

27 Sep 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson

Please try again; I believe that the current version includes all the files you need to run this. (Please let me know if there are any additional issues with MorphTool...).
Thanks, Bret

23 Sep 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson

@Kelly and YAZ (and others):

Thanks to you both. I just figured out that you are using a version of MATLAB that predates R2009b. (Correct?) I use tildes to ignore unwanted arguments; that capability was introduced in '9b.) TO FIX THIS: Either upgrade to a newer MATLAB ;), or replace the tildes in my code with some word like "junk." That should do it!

Comments and Ratings on Brett's Files View all
Updated File Comment by Comments Rating
28 Jan 2012 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson Shapkin, Andrey

Great piece of work, thanks.

function [data,header] = edfread(filename)
% Read European Data Format file into MATLAB

fid = fopen(filename,'r','ieee-le');
% PART1
hdr = char(fread(fid,256,'uchar')');

header.ver=str2num(hdr(1:8)); % 8 ascii : version of this data format (0)
header.patientID = char(hdr(9:88)); % 80 ascii : local patient identification
header.recordID = char(hdr(89:168)); % 80 ascii : local recording identification
header.startdate=char(hdr(169:176)); % 8 ascii : startdate of recording (dd.mm.yy)
header.starttime = char(hdr(177:184)); % 8 ascii : starttime of recording (hh.mm.ss)
header.length = str2num (hdr(185:192)); % 8 ascii : number of bytes in header record
    reserved = hdr(193:236); % [EDF+C ] % 44 ascii : reserved
header.records = str2num (hdr(237:244)); % 8 ascii : number of data records (-1 if unknown)
header.duration = str2num (hdr(245:252)); % 8 ascii : duration of a data record, in seconds
header.channels = str2num (hdr(253:256));% 4 ascii : number of signals (ns) in data record

%%%% PART2

header.label=cellstr(char(fread(fid,[16,header.channels],'char')')); % ns * 16 ascii : ns * label (e.g. EEG FpzCz or Body temp)
header.transducer =cellstr(char(fread(fid,[80,header.channels],'char')')); % ns * 80 ascii : ns * transducer type (e.g. AgAgCl electrode)
header.units = cellstr(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * physical dimension (e.g. uV or degreeC)
header.physmin = str2num(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * physical minimum (e.g. -500 or 34)
header.physmax = str2num(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * physical maximum (e.g. 500 or 40)
header.digimin = str2num(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * digital minimum (e.g. -2048)
header.digimax = str2num(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * digital maximum (e.g. 2047)
header.prefilt =cellstr(char(fread(fid,[80,header.channels],'char')')); % ns * 80 ascii : ns * prefiltering (e.g. HP:0.1Hz LP:75Hz)
header.samplerate = str2num(char(fread(fid,[8,header.channels],'char')')); % ns * 8 ascii : ns * nr of samples in each data record
    reserved = char(fread(fid,[32,header.channels],'char')'); % ns * 32 ascii : ns * reserved

% DATA read

Ch_data = fread(fid,'int16');

if header.records<0, % number of data records (-1 if unknown)
R=sum(header.duration*header.samplerate);
header.records=fix(length(Ch_data)./R);
end

% reshape data
Ch_data=reshape(Ch_data, [], header.records);

 
% scale set
sf = (header.physmax - header.physmin)./(header.digimax - header.digimin);
dc = header.physmax - sf.* header.digimax;

data=cell(1, header.channels);
Rs=cumsum([1; header.duration.*header.samplerate]); % index of block data -> Rs(k):Rs(k+1)-1

for k=1:header.channels
data{k}=reshape(Ch_data(Rs(k):Rs(k+1)-1, :), [], 1);
% scale data
data{k}=data{k}.*sf(k)+dc(k);
end

% data=cell2mat(data);

27 Jan 2012 deleteoutliers For input vector A, returns a vector B with outliers removed. Author: Brett Shoelson Farrahi Moghaddam, Reza
16 Jan 2012 uiselectim Visually select a single image from an array of images in a directory. Author: Brett Shoelson Shachaf, Amit

Very nice utility

28 Oct 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson recep

thanks alot it's work

25 Oct 2011 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson Shoelson, Brett

recep, Kelly, et al: I see what's happening now. I provided auxiliary files in a folder, assuming that they would be put on your MATLAB path. You can either add those folders manually to the path, or drag the files out of the folders, or issue this (or equivalent) command:

addpath(genpath(fileparts(which('MorphTool.m'))))

Let me know if that addresses the issue, please.

Top Tags Applied by Brett
utilities, directories, files, gui, path
Files Tagged by Brett View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
23 Jan 2012 Screenshot Primer Design GUI A GUI for designing primers Author: Brett Shoelson primer design, genbank, bioinformatics, dna synthesis 34 0
23 Jan 2012 Screenshot markPoints Manually mark and count objects in an image. Author: Brett Shoelson count objects regions... 30 0
23 Jan 2012 Screenshot edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson edf european data for... 29 1
  • 5.0
5.0 | 1 rating
05 Oct 2011 nancumsum Compute the cumulative sum of matrices, specifying the treatment of NaNs. Author: Brett Shoelson nan, cumulative, sum, cumsum 20 2
  • 5.0
5.0 | 2 ratings
05 Oct 2011 nancumprod Compute the cumulative product of matrices, specifying the treatment of NaNs. Author: Brett Shoelson nan, cumulative, prod, cumprod 0 7
  • 5.0
5.0 | 1 rating

Contact us at files@mathworks.com