Rank: 9 based on 2075 downloads (last 30 days) and 64 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
13 May 2013 Screenshot FindCirclesGUI Launches a GUI environment for the detection of circles in an image. Author: Brett Shoelson circle detection, imfindcircles, find circles, circular hough transf..., detect circles 111 3
  • 5.0
5.0 | 2 ratings
13 May 2013 Screenshot sliderPanel A new UICONTROL object with a slider as a child of a uipanel, with auto-linked edit box and labels. Author: Brett Shoelson example, gui tools, uicontrol slider pane... 82 3
  • 5.0
5.0 | 2 ratings
03 Apr 2013 Screenshot SegmentTool: An Interactive GUI for Segmenting Images Interactively find the best approach to segmenting (masking) your image Author: Brett Shoelson app, image, gui, segmentation, image processing, mask 301 11
  • 5.0
5.0 | 3 ratings
28 Mar 2013 Screenshot expandAxes Click any axes to expand it in a separate figure. Right-click expanded axes to export contents! Author: Brett Shoelson grow axes popup figur... 29 9
  • 4.85714
4.9 | 7 ratings
28 Mar 2013 Screenshot exploreRGB Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image. Author: Brett Shoelson explore rgb color pla..., color, circularhough_grd_sl, rgb 150 12
  • 3.83333
3.8 | 6 ratings
Comments and Ratings by Brett View all
Updated File Comments Rating
17 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Hi Cindy,

Clearly I'm missing something...

If you can share a file with me and explicitly explain what you'd like to read (and what you'd like to skip), I will dig in and see if I can improve this reader.

Thanks!
Brett
char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))

16 May 2013 exploreRGB Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image. Author: Brett Shoelson

@MM:

[Note: MM indicated to me in an email that he was getting "file 'file_open.png' not found" errors.]

I verified that 'file_open.png' is included in the zip. Would you please download the submission again and ensure that all files are on your MATLAB path?

Thanks,
Brett

01 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Farid, I thought that's what I did. Perhaps if my response is unclear, or if I misunderstood your question, you can email me with a better explanation of what you would like to do with EDFREAD.
Cheers,
Brett
char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))

01 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

Farid,
Number of channels (signals?) is specified in line 124:
hdr.ns = str2double(fread(fid,4,'*char')');

In subsequent lines (125,128,132,...) the files reads 1:hdr.ns. If you wanted to, you could modify those calls to read (for example) signals [1,3,5,6,7] by changing instances of

for ii = 1:hdr

to

for ii = [1,3,5:7]

HTH,
Brett

29 Apr 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson

@Oleksandr (and Ibraheem):
Thanks for the reviews/comments. My goal in writing this was to facilitate using MATLAB to analyze data stored in EDF format.

I encourage you to share your EDFWrite function, if you write one; creating that capability is a bit outside of my job description. ;)

I'm curious, though: what is your rationale for exporting to EDF after you've brought data in to MATLAB for analysis? Is there something you need to do with them that you can't do with MathWorks' tools? (Or did you just want to share with non-MATLAB users?)

Brett (the MATLAB guy)

Comments and Ratings on Brett's Files View all
Updated File Comment by Comments Rating
18 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson Cindy

Hi Brett,

I think I'm getting somewhere by only reading the necessary info (instead of all channel data) into tmpdata. I'm not sure if I'm getting the syntax of fread right though, specifically the SKIP argument. e.g. if I only want one channel (i.e. channel #k):

tmpdata(recnum).data{1} = fread(fid,hdr.samples(k),'int16',hdr.ns*2) * scalefac(k) + dc(k);

which doesn't quite work. I'm probably missing something...

17 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson Shoelson, Brett

Hi Cindy,

Clearly I'm missing something...

If you can share a file with me and explicitly explain what you'd like to read (and what you'd like to skip), I will dig in and see if I can improve this reader.

Thanks!
Brett
char(cumsum([98 16 -13 15 0 -70 69 -11 7 -10 7 7 -4 -1 -46 45 -12 19 -12 15 -8 3 -7 8 -69 53 12 -2]))

17 May 2013 edfRead A simple file reader for European Data Formatted (EDF-) files. Author: Brett Shoelson Cindy

Thanks for this, very handy indeed.

As a previous poster has noted though, if you're only after specific channels, the code uses up a great deal of memory.

Replacing
for ii = 1:hdr.ns
with
for ii = 1:[1,3,5:7]

doesn't quite work at the point when tmpdata is being generated (where fread is used), nor does it reduce the size of the matrix being created. I run into Out of Memory problems at:

record = zeros(hdr.ns, hdr.samples(1)*hdr.records);

because tmpdata is already taking up too much memory space.

Any thoughts on overcoming these problems? I thought about deleting the irrelevant channels from tmpdata, but got a bit stuck with the syntax. Help would be appreciated!

16 May 2013 exploreRGB Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image. Author: Brett Shoelson Shoelson, Brett

@MM:

[Note: MM indicated to me in an email that he was getting "file 'file_open.png' not found" errors.]

I verified that 'file_open.png' is included in the zip. Would you please download the submission again and ensure that all files are on your MATLAB path?

Thanks,
Brett

16 May 2013 exploreRGB Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image. Author: Brett Shoelson M, M

It doesn't seem to work for me...

Top Tags Applied by Brett
utilities, gui, directories, files, image processing
Files Tagged by Brett View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
13 May 2013 Screenshot FindCirclesGUI Launches a GUI environment for the detection of circles in an image. Author: Brett Shoelson circle detection, imfindcircles, find circles, circular hough transf..., detect circles 111 3
  • 5.0
5.0 | 2 ratings
13 May 2013 Screenshot sliderPanel A new UICONTROL object with a slider as a child of a uipanel, with auto-linked edit box and labels. Author: Brett Shoelson example, gui tools, uicontrol slider pane... 82 3
  • 5.0
5.0 | 2 ratings
03 Apr 2013 Screenshot SegmentTool: An Interactive GUI for Segmenting Images Interactively find the best approach to segmenting (masking) your image Author: Brett Shoelson app, image, gui, segmentation, image processing, mask 301 11
  • 5.0
5.0 | 3 ratings
28 Mar 2013 Screenshot expandAxes Click any axes to expand it in a separate figure. Right-click expanded axes to export contents! Author: Brett Shoelson grow axes popup figur... 29 9
  • 4.85714
4.9 | 7 ratings
28 Mar 2013 Screenshot exploreRGB Simple utility to view all color planes, grayscale, and colorspace conversions of an RGB image. Author: Brett Shoelson explore rgb color pla..., color, circularhough_grd_sl, rgb 150 12
  • 3.83333
3.8 | 6 ratings

Contact us