Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
11 Nov 2009 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson Julia

and one more thing: is there a way to give input information regarding the sheet one wants to be written to?

11 Nov 2009 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson Julia

Dear Brett,

I know excel is evil and doesn't implement the NaN standard, but is there a way to get your program to write something sensible, like "-" or ".." to a cell when the data array has an NaN?

Right now it writes 65535 for me, which is far to close to a real number to be helpful.

Cheers and thanks for the great coding,
Julia
 

20 Oct 2009 freehanddraw Draw smooth lines freehand on images or plots; return the handle and xy data of the line object. Author: Brett Shoelson Analyst, Image

I had been using this with R2008b and discovered that it's still "broken" in R2009b, but thanks to Paul Groot's helpful comment, it's now working again. However, now that the Image Processing Toolbox has imfreehand(), maybe you could use that instead.

06 Oct 2009 zoom2cursor Dynamic, scalable zoom following the motion of the cursor; also displays the current position. Author: Brett Shoelson Attard, Charles

Very useful, thanks.
For those wondering how to exit the function, just click on 'X'.

I've found useful to create a 'exit_zoom2cursor' function.
If you're interested, comment the statement 'endbutton = ...'
And call this function:

function exit_zoom2cursor
zoomparams = getappdata(gcf,'zoomparams');
if isempty(zoomparams)
    return;
end;
set(gcf,'windowbuttonmotionfcn',zoomparams.oldwbmf);
set(zoomparams.currax,'units',zoomparams.oldaxunits,'xlim',zoomparams.oldxlim,'ylim',zoomparams.oldylim);
set(get(zoomparams.currax,'children'),'buttondownfcn',zoomparams.bdfcnold,'busyaction',zoomparams.baold);
set(gcf,'pointer',zoomparams.oldpointer,'doublebuffer',zoomparams.dbold);

01 Oct 2009 deleteoutliers For input vector A, returns a vector B with outliers removed. Author: Brett Shoelson Marcin

Very good. I compared your results with the one from:
http://www.graphpad.com/quickcalcs/Grubbs1.cfm
on my data and got the same results. Good work!

18 Sep 2009 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson Barragan Guerrero, Diego Orlando

11 Sep 2009 freehanddraw Draw smooth lines freehand on images or plots; return the handle and xy data of the line object. Author: Brett Shoelson Groot, Paul

Very nice work!
Noticed a small issue, which may only occur in recent (R2009a) releases: The DoubleBuffer property seems not always present in the oldvals structure at line 82. This could be solved by moving it to a separate line:

if isfield(oldvals, 'DoubleBuffer')
    set(gcf,'doublebuffer',oldvals.DoubleBuffer);
end

27 Aug 2009 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson sherer, Pete

Why do I get this error message?

??? Error using ==> Write2Excel at 157
Sorry...unable to open file ./loss_summary_v11_IEDv11_20090827_1438.xls

I checked the file path, and the file exists.
K>> exist(fileloc,'file')
ans =

     2

06 Aug 2009 clusterImg Interactively segment RGB image into n user-defined clusters. Author: Brett Shoelson chen, shoo

thank you ,you are very strong

13 Jul 2009 logb Calculate the log of a number/matrix using a user-specified base. Author: Brett Shoelson Salexa, Juliette

Does the latest version of matlab still not have this ???
As far as I understand, running a funciton like this is slower than if matlab had an internal function, since the internal funciton would be compiled into machine code ??

26 Jun 2009 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson Shoelson, Brett

Danilo, thanks for finding the bug (and for suggesting a fix). New version addresses this!

23 Jun 2009 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson Danilo

Great idea and nice implementation !!!! I've just downloaded and I'm already loving it... :-)

Just a small bug found, when called without any arguments, I get:

>> togglefig
??? Input argument "clearfig" is undefined.

The problem is solved by adding the line

 clearfig = 0;

just before

elseif nargin == 1

Cheers!

31 May 2009 freehanddraw Draw smooth lines freehand on images or plots; return the handle and xy data of the line object. Author: Brett Shoelson DeBattista, Aaron

Very good work works very nicely !!!
Has anyone managed to merge the line object to the actual image one is drawing upon.... i.e change the value of the actual image pixels .. Thanks

27 May 2009 MorphTool An interactive environment for morphologically operating on images. Author: Brett Shoelson kane, ababacar

important pour mon projet

10 May 2009 readfromexcel Returns values in multiple ranges of existing Excel file. Author: Brett Shoelson Abdul Halin, Alfian

Hi all :)

I am using this function and its a great2 tool.

Just have some things that I thought of:

1) When I run it, the Excel popup window will come up and ask me whether I want to save the file or not (my Excel was closed and of course the file was not open). Why does this happen ya? Can it be disabled?

2) I am using Excel 2007. I realize that when saving as 2007, this function does not work. Does this mean there is no compatibility with the office 2007 suite?

But overall... a great and easy tool to use. Excellent work by the author! :D

10 May 2009 Segment and Quantify Tissue Metastasis: A Tutorial These are files I often use to demonstrate the power of MATLAB and the Image Processing Toolbox. Author: Brett Shoelson Nurlanbek

03 Apr 2009 freehanddraw Draw smooth lines freehand on images or plots; return the handle and xy data of the line object. Author: Brett Shoelson Arthur

useful tool!

26 Mar 2009 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson Arthur

19 Jan 2009 deleteoutliers For input vector A, returns a vector B with outliers removed. Author: Brett Shoelson Modin, Hanna

Thank you for a nice implementation of Grubbs test! If I might suggest an improvement that would be to make the test work with other than vectors, e.g. to remove outliers from each row in a matrix separately

17 Oct 2008 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson de lafuente, victor

Thanks for this useful function.

I suggest a couple of extra lines to generate a unique figure number, so that other *.m files still using figure(1), figure(2), etc. do not overwrite the figures created by togglefig. It will pause for 10 ms each time a new figure is created, but this can be modified according to your computer platform (see 'pause' help).

...
if isempty(fig)
   pause(.01)
   FigNum = round(sum(1000*clock));
   fig = figure(FigNum);
   set(fig,'numbertitle','off',...
           'name',name);shg;
else
...

09 Oct 2008 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson pp, mm

02 Sep 2008 exploreRGB Simple utility to view (in subplots of a figure) all color planes, and grayscale and RGB versions, o Author: Brett Shoelson Dick, Eric

I love this. This is a great tool for showing people RGB concepts. I love how this displays the images in such an elegant layout.

16 Aug 2008 uiselectim Visually select a single image from an array of images in a directory. Author: Brett Shoelson Leung, Alex

Great GUI to select an image!

07 Aug 2008 Segment and Quantify Tissue Metastasis: A Tutorial These are files I often use to demonstrate the power of MATLAB and the Image Processing Toolbox. Author: Brett Shoelson sankar, karthika

04 Aug 2008 Segment and Quantify Tissue Metastasis: A Tutorial These are files I often use to demonstrate the power of MATLAB and the Image Processing Toolbox. Author: Brett Shoelson zhao, jichao

that is really excellent one, thanks.

25 Jul 2008 Filegrep A GUI-driven file grep/backup/editing tool. Author: Brett Shoelson Shvorob, Dimitri

For some reason, filegrep is taking forever to start; when I end hit Ctrl-C, I get

Error in ==> ver>LocParseContentsFile at 160
      fp = fopen(fName,'rb');

Error in ==> ver>sort_toolbox_list at 301
   [structInfo,dispString]=...

Error in ==> ver at 86
   [Toolboxes,verStruct] = sort_toolbox_list(p,isArgout,verStruct,nameLen,verLen);

Error in ==> filegrep at 39
grepopts.rel = ver; grepopts.rel = grepopts.rel(1).Release; grepopts.rel = str2num(grepopts.rel(3:end-1));

18 Jul 2008 readfromexcel Returns values in multiple ranges of existing Excel file. Author: Brett Shoelson Osmane, Mariam

Hi,
I am beginner to Matlab.
where can I add this file, to make readfromexcel recognized by Matlab as defined functions?

TIA

05 Jun 2008 lombscargle.m Performs a Lomb-Scargle periodogram analysis on unevenly spaced data. Author: Brett Shoelson Sattari, Pooria

Hey Guys:

I have problems with the inputdata prcedure. How should I input my n*2 matrix?

Thanks,

02 Jun 2008 lombscargle.m Performs a Lomb-Scargle periodogram analysis on unevenly spaced data. Author: Brett Shoelson Demirhan, Hasan

i have 538 data points and i need analyse these data. But when i entering hifac=1548 programme did't work, so i need fast computation for this value.

27 May 2008 expandAxes Sets all axes in the handle list to expand in a new figure on buttondown. Author: Brett Shoelson Karpov, Sergey

Thank u!

14 May 2008 Calling MATLAB from PowerPoint Here are 5 simple steps that will have you executing your MATLAB code from PowerPoint in no time! Author: Brett Shoelson Gamil, Gamal

Thank You

14 May 2008 Intensityadjust Launches an interactive figure for modifying the input parameters of the IP Toolbox fcn IMADJUST. Author: Brett Shoelson Hurvitz, Aviv

Works as promised.

30 Apr 2008 factor2 Returns the factors (not only the prime factors) of positive integer k, including k itself. Author: Brett Shoelson mahajan, dhiraj

Thanks a lot, it was very helpfull indeed.

12 Apr 2008 clusterImg Interactively segment RGB image into n user-defined clusters. Author: Brett Shoelson chuan-he, li

thanks you

03 Apr 2008 Filegrep A GUI-driven file grep/backup/editing tool. Author: Brett Shoelson Shvorob, Dimitri

Two issues:
1. Scroll bar for the search-results list doesn't work. (Matlab 2007a here).
2. String search-and-replace does not rename files; it would be nice to add the capability.

31 Mar 2008 Filegrep A GUI-driven file grep/backup/editing tool. Author: Brett Shoelson Shvorob, Dimitri

Brett rules! Thanks a lot! :)

27 Mar 2008 logb Calculate the log of a number/matrix using a user-specified base. Author: Brett Shoelson Gunner, Ubgunner

03 Mar 2008 clusterImg Interactively segment RGB image into n user-defined clusters. Author: Brett Shoelson Hu, Jiang

Thank you for your code!

13 Feb 2008 write2excel Writes data to multiple ranges of existing Excel file. Author: Brett Shoelson Pelaez, R.

Thanks a lot for your work.

04 Feb 2008 lombscargle.m Performs a Lomb-Scargle periodogram analysis on unevenly spaced data. Author: Brett Shoelson rupa, kondala rao

23 Jan 2008 EnvelopeFromImage Detect the envelope of a signal from an image Author: Brett Shoelson Halawani, Osama

22 Jan 2008 Dockfig/Undockfig Programmatically dock or undock one or all open figures. Author: Brett Shoelson Poda, Mikhail

It's a pity that docking does not work with compiled Matlab (at least in R2006a) ...

15 Jan 2008 expandAxes Sets all axes in the handle list to expand in a new figure on buttondown. Author: Brett Shoelson D'Errico, John

A creative way to turn a whole mess of plots into thumbnail images. Then you can click on only the ones you want to see to bring them up.

11 Jan 2008 expandAxes Sets all axes in the handle list to expand in a new figure on buttondown. Author: Brett Shoelson Rooney, Bob

Perfect! Thanks alot.

11 Jan 2008 expandAxes Sets all axes in the handle list to expand in a new figure on buttondown. Author: Brett Shoelson B., Olivier

Simple but very usefull when managing lot of subplots !

10 Jan 2008 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson D'Errico, John

All fixed.

10 Jan 2008 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson Shoelson, Brett

ALL: To further follow up on John's comment, note that John correctly pointed out (via private email) that suppressing the handle if nargout == 0 does not disallow the reference-by-name functionality I wanted. I'm reposting the file to implement the modest change he suggested.

10 Jan 2008 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson Shoelson, Brett

Thanks for the comment, John. My first thought was to implement your suggestion; it would be trivially easy. But on reflection, I like TOGGLEFIG's forced issuance of a handle. In my workflow, I do things like:

set(togglefig('FigureName'),'color','k');

This gives me painless (by-name) handling of my figures, and frees me from having to use the more unwieldy

set(findobj('type','figure','name','Figurename'),'color','k').

You can still do

togglefig Fred;

(With the semicolon to suppress the display of the handle.)

Alternatively, I leave it to the user to modify the function to delete the function handle if not requested as an output.

Cheers!

05 Jan 2008 logb Calculate the log of a number/matrix using a user-specified base. Author: Brett Shoelson Shoelson, Brett

Not to reflect on your specific suggestion, Christophe, but I'd argue that no, you can't/shouldn't check everything. First, that's a near impossibility; someone can always find a way to trigger unwanted behavior. And second, one can add so much overhead in error checking that writing and maintaining (and even calling) functions can become cumbersome. Rather, one should check for the common things, leave the rest to the user. At some point, it makes sense to rely on the underlying on MATLAB's built-in errors/warnings.

04 Jan 2008 TOGGLEFIG Finds and activates, or creates, figure with user-specified name. Author: Brett Shoelson D'Errico, John

Its excellent, as I fully expect from Brett.

I don't know if this is being picky or not, but I'd add a couple of lines to the very end.

if nargout==0
  clear fig
end

I think this is the standard for functions like plot or figure. When called as a command or with no output arguments, they do not try to return an output. Thus I'd expect to be able to do

togglefig Fred

and have a figure named "Fred" created, but without the handle itself ever returned. You should only get a handle when you ask for it. As it is now, togglefig now returns

ans
   = 1

when I call it as a command.

I'll rate this a 5 anyway.

 

MATLAB Central Terms of Use

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Terms prior to use.

Contact us at files@mathworks.com