Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
13 Nov 2009 mtit: a pedestrian major title creator MTIT creates a major title in a figure with many axes Author: us us

this happens by design:
after MTIT terminates, the current (active) axis (GCA) is the handle of the invisible surrounding axis created by MTIT...
i've changed this behavior and an update should show up soon...
in the meantime, you can use this (tedious) approach
% create your figure/axes
     cah=gca; % <- save current axis handle
     mtit(gcf,'foo');
     axes(cah); % <- reset current axis handle

us

07 Nov 2009 MATLAB Contest - Flooding All the files needed to develop and score an entry for the MATLABĀ® Programming Contest. Author: The MATLAB Contest Team us

just a very marginal note:
this version of GETCOMPLEXITY's number-extraction-engine(!) is about 25% faster and does not use EVAL...

function mc=getComplexity(filename)
mc=mlint('-cyc','-string',filename);
mc=regexp(mc,'The McCabe complexity of \S+ is (\d+)','tokens');
mc=[mc{:}];
mc=max(strread(sprintf('%s\n',mc{:})));
end

us

24 Oct 2009 finding_ensemble_parameters_of_random_signal_in_a_communication_channel Find ensemble parameters of random signal in a communication channel. Author: Dimuthu Senanayaka us

in addition to <jan>'s already thorough review:
RUN is a ML stock function, which should not be duplicated...

us

21 Oct 2009 Quick routine to plot RGB overlay of three images plotRGB allows quick plotting of an overlay of three grayscale images Author: Lennaert us

...min(min(X)) would be a faster as min(X(:))...

not quite

% ic2/2*2.6ghz/2gb/winxp.sp3/r2009b
x=rand(1000);
tic;for i=1:1000;min(x(:));end;toc
% Elapsed time is 1.469955 seconds.
tic;for i=1:1000;min(min(x));end;toc
% Elapsed time is 1.491293 seconds.

for smaller xes, its even faster...
just a thought
us

31 Aug 2009 unique_no_sort_rows find unique rows of a matrix without resorting the rows Author: Michael Petralia us

does not work on matrices M x N with N > 2,
since your statement
     B = unsorted(:,2:3);
should read
     B = unsorted(:,2:end);

us

29 Aug 2009 BlobsDemo Image Processing Tutorial to demonstrate the basic concepts to beginner users. Author: Image Analyst us

an excellent and exceptionally well commented image processing demo by a seasoned ML user and senior CSSM citizen...

a few changes i'd make:
- put it into a function
  -> no need for the bad CLEAR ALL...
- make the figure size smaller -and-
- put an ECHO ON/OFF at the beginning/end of the demo
  -> for users to be able to enjoy the comments during run-time...

just a few thoughts
us

19 Aug 2009 MATLAB rooms KMN Color simulation of the neural instants physicity. Author: PXlab us

yes, the big number of rows, eg

function KMN % MIB & ColorWeight2
...
fprintf('\n');
fprintf('\n');
fprintf('\n');
...

could be simplified into

...
fprintf('\n\n\n');
...

with a more recent version of ML (if i'm not mistaken: starting with 2008b)

us

19 Aug 2009 ColorWeight (double version) The color weight without weight. Author: PXlab us

when we run your nice

     colorweight2

using lena.jpg as an input with parameters

to select a row of time in seconds (1-30100): 12
to select a column of space in meters (1-30100): 12
to select the red color (0-300): 12
to insert a positive number of weight [Kg] with range 1-1000: 12

we get this result

point of half: clock verse dynamic solution without weight
time = 0 % <- ok, same val
space = 0 % <- ok, same val
velocity = -11 % <- YES, we got the same value(!)...
acceleration = -11.917 (!?!) % <- SEE NOTE...
mass = 0 % <- ok, same val
weight force = -11 % <- ok, same val

however, when we use our own algorhythm, we get
acceleration = -11.921

which is grossly different and now jeorpadizes our next submission to NEUROLOGY...

please, clarify immediately as this is soon going to cause some real problems - if not havoc - for the scientific world...

us

19 Aug 2009 MATLAB rooms KMN Color simulation of the neural instants physicity. Author: PXlab us

the syntax of some of your commands and the flow of your engine in general could be vastly improved if you upgrade your rather old ML version to a new one...

us

13 Aug 2009 fdep: a pedestrian function dependencies finder FDEP dissects ML files and iteratively looks for all user defined functions used during runtime Author: us us

hi dirk
great suggestion for an enhancement!...
i built a helper function, which does what you need and will email it to you if you want...
it will become part of FDEP as soon as i can get to it...
us

12 Aug 2009 Mixing / Combining 2 Images (Image Fusion) This program fuses/combines/mixes 2 images It supports both Gray & Color Images Author: Athi us

how can this earn 5 stars(?)...
a script that clears the workspace without asking, no help, no explanation, no comment, no choice of input...
us

10 Aug 2009 ds group contribution Author: naser rezakhani us

a script, no help, no explanation, no comment, no choice of input, idiosyncratic and undecipherable values...
us

05 Aug 2009 Simple Skin segmentation Simple matlab program for Skin segmentation Author: Pon us

a script, no help, no explanation, no comment, no choice of input, idiosyncratic values...
us

01 Aug 2009 exciseRows A helper function. Removes all rows with NaNs. Author: Alexander Taylor us

no need to introduce a different output arg...
simply do this

function mat=exciseRows(mat)
     mat(any(isnan(mat),2),:)=[];
end

two more things
- the help section does not yet live up to standards...
- there are no sanity checks...

us

28 Jul 2009 35 Complete GUI Examples 35 working GUIs to read and learn. Author: Matt Fig us

this first class ML senior has offered an enormous amount of time to create this exhaustive suite of working and highly educational GUI examples to our community...
both novices, in particular, as well as more advanced users will find a lot of good stuff in those exemplary functions...
this submission certainly will find its way into many CSSM threads as a hint for solutions as well as good programming practice...

altogether, hats off not only to a ML cognoscente but also to a teacher who clearly seems to be fond of people 'doing' ML...

us

ps: matt, what about a small CONTENTS.M, which would be easier than the (nice) PDF you proved (just a pedestrian thought)...

27 Jul 2009 fdep: a pedestrian function dependencies finder FDEP dissects ML files and iteratively looks for all user defined functions used during runtime Author: us us

jason

yes, this is by design...
while it could easily be changed, it also (potentially) would lead to undesirable results...
thus, to FDEP a file residing in a folder, which is not in ML's path, you must CD into that folder...
however, let me know if this is a real problem for you, as it certainly can be changed...

us

26 Jul 2009 SDF - Set the Figure Set the line width and fonts of a figure, as if using the File->Export setup in the figure menu Author: Andrey Popov us

well done...
now, the next step to get the 5th star:

1) add an output arg, which returns the current STYLE struct...
2) now, a user can change fields to his/her liking - and save it...
3) allow the user to enter his/her (modified) struct...
   eg,
          if isstruct(varargin{1})
          style=varargin{1};
          %...
          end

all done in a split...
and a big enhancement to an already nice function...
us

22 Jul 2009 SDF - Set the Figure Set the line width and fonts of a figure, as if using the File->Export setup in the figure menu Author: Andrey Popov us

it would be nice, if a user could also input the name of his/her style sheet:
add this to the engine

function sdf(fig,snam)
if nargin == 1
% your code
else
% note: REMOVE extension, which is .txt by def
s=hgexport('readstyle',snam);
% ...apply style sheet info
hgexport(fig,fnam,s);
end

just a thought...
us

22 Jul 2009 largestMax The largest component of all vector and/or matrix inputs. Author: Brian Schrameck us

another way

function r=gmax(varargin)
try
r=max(cellfun(@(x) max(x(:)),varargin));
catch %#ok
error('invalid input argument(s)');
end
end

us

22 Jul 2009 smallestMin The smallest component of all vector and/or matrix inputs. Author: Brian Schrameck us

another way

function r=gmin(varargin)
try
r=min(cellfun(@(x) min(x(:)),varargin));
catch %#ok
error('invalid input argument(s)');
end
end

us

02 Jul 2009 Clean up context of anonymous function handles - bug #328733 This submission provides a workaround for MATLAB bug #328733. Author: Volkmar Glauche us

note: since r2009a you can do this

     f1=@(x) mod(x,2);
     f2=str2func(func2str(f1));

- the private workspace issue is the same...

us

24 Jun 2009 EXPAND Replicate and tile each element of an array. Author: Matt Fig us

just like jos, i also felt at first that this - admittedly sleek engine - was more or less a KRON clone; but then your timing convinced me that there was clearly more to it...
however, i think you should at least mention KRON in a
see also:
statement...
us

22 Jun 2009 RGB triple of color name, version 2 Returns a Matlab RGB color specifier corresponding to a given color name (139 colors supported). Author: Kristjan Jonasson us

excellent in-depth help including many references...
easily expandable look-up table engine...
certainly very useful for color-freaks...
us

19 Jun 2009 geom3d Library to handle 3D geometric primitives: create, intersect, display, and make basic computations Author: David Legland us

it is too bad that this (apparently) full-fledged software package does not come with an appropriate and modern help/intro/example module called a published m-file...

as of now, it is somewhat tedious for a naive user to have to wade through the help sections of the individual help files (or the densly written contents.m) - and it will (most likely) not give your package as much attention as it probably deserves...

us

19 Jun 2009 Matrix to file Writes matrix to a file. Arguments: matrix and file-name Author: Nicolai Sten us

as was mentioned above, there is (at least) one FEX submission, which does this - with a lot of options...

http://www.mathworks.com/matlabcentral/fileexchange/23840

us

08 Jun 2009 fdep: a pedestrian function dependencies finder FDEP dissects ML files and iteratively looks for all user defined functions used during runtime Author: us us

with the latest version (08-Jun-2009 22:24:13/R14-R2009a), per isakson's error messages do not show anymore...
the reason was an old parser engine, which did not handle more recent function constructs...
thanks, per, for alerting me to this problem...
us

02 Jun 2009 Sudoku This is a Sudoku game that is able to generate new games by itself. Author: Zhen Qian us

useless without M-code...

us

02 Jun 2009 ScreenCapture - get a screen-capture of a figure frame or component ScreenCapture gets a screen-capture of any Matlab GUI handle, or specified screen area rectangle Author: Yair Altman us

a very nice robot, which the FEX community has been looking for a long time...
two thoughts:
1) in interactive mode, the user looses the data if no output arg is selected, which may be a bit frustrating:
a) a warning(?)
b) a new figure displaying the result by default(?)
2) we've been using this approach, which may be a bit faster (depending on the size of the capture) by converting the planes in one shot using a macro...

% input
% xoff/yoff/xlen/ylen
% assign after loading java stuff...
     rob=Robot;
% macro
     conv=@(a,b,c) double(bitand(a,255^b))./255^c;
% capture screen contents at this pos
     rec=Rectangle(xoff,yoff,xlen,ylen);
     cap=rob.createScreenCapture(rec);
     dat=cap.getData;
     buf=dat.getDataStorage;
     buf=typecast(buf(:),'uint32');
     buf=reshape(buf,dat.getWidth,dat.getHeight).';
     mm=zeros([size(buf),3]);
     mm(:,:,3)=conv(buf,1,0); % bitand(buf,255^1)./255^0;
     mm(:,:,2)=conv(buf,2,1); % bitand(buf,255^2)./255^1;
     mm(:,:,1)=conv(buf,3,2); % bitand(buf,255^3)./255^2;
     mm=mm./255;
% ...for display in a regular figure
     figure;
     set(gca,'position',[0,0,1,1]);
     image(mm);
     axis image;
     axis off;

3) in principle, the robot itself can be used on any screen location; it would be nice - however, admittedly cumbersome - to add this feature

us

02 Jun 2009 COMBINATOR -combinations AND permutations Returns 1 of 4 different samplings on the set 1:N, taken K at a time. Author: Matt Fig us

a very nice package/wrapper for a lot of the combinatorial problems almost daily asked for in the NG - or - as the name implies: a TERMINATOR for combiners...

in particular:
- excellent help/good example
- clean engine divided into intelligible subfunctions
- many comments and timings

us

27 May 2009 Wrap a long syms equations wraps a long syms equation so that it becomes more readable. Author: Mohannad Hakeem us

there should be a L1 line in the help section...
the help section is broken: add a % between the description and the example...
the n_columns variable should be an optional input making it more easy to change than having to edit the file...
the result should also be collected in an (optional) output argument...

us

21 May 2009 cprintf: a pedestrian ND array formatting and display utility cprintf converts an ND array or ND cell array to a 2D character array and - optionally - a table Author: us us

gordon,
1) you show the input to FPRINTF; how do you call CPRINTF?
2) the error message indicates that some input values are not defined(?)
can you clarify?
thanks
us

19 May 2009 rice labeling applying regionprops and label to label rice . Author: gilly liang us

calls several functions from the image processing toolbox, which is NOT mentioned as a requirement...

us

19 May 2009 BeadFluct v1.0 Monte-Carlo simulation to calculate position of micronsized particles in optical trap Author: Fabian Czerwinski us

calls RANDOM, a function of the statistics toolbox, which is NOT mentioned as a requirement...

us

19 May 2009 class2str: creates an eval-able string containing Matlab code describing a variable Creates an eval-like string which represents a variable. Useful for saving data/INI configuration Author: Emmanuel Farhi us

nice and useful utility... given the release for which it was coded (r13)

unfortunately, it does not (yet!) too well for more modern data types:
- function handles are recognized and it ends with a error msg
- graphics handles, eg, gca/line/etc, are caught by
  their current value
- other classes are decoded into a struct, which may not
  completely reconstruct the object, eg,
     c=cfit; % <- a fit object
  ends up as
     res=struct(c);

some of these (understandable) shortcomings should be mentioned in the help section...
us

18 May 2009 cell2num.m convert a cell array to a double precision array Author: Phillip M. Feldman us

why do you submit another author's (unaltered?) code - just
because it's a missing part of one of your own contributions...

http://www.mathworks.com/matlabcentral/fileexchange/24109

it would be more prudent to ask the author to submit it him/herself and then add it to the above...

us

15 May 2009 Don't let that INV go past your eyes; to solve that system, FACTORIZE! A simple-to-use object-oriented method for solving linear systems and least-squares problems. Author: Tim Davis us

a truly professional and INValuable package written with a twinkle in the (author's) eye and a must look-at for people dealing with linear systems...
one pedestrian thought: why not create a stand-alone object given ML's new and powerful OOP-strength...
us

14 May 2009 hostname.m Report the name of computer on which Matlab is currently running. Author: Phillip M. Feldman us

use of java system calls is (likely) a more os independent way to retrieve such information, eg,

http://www.mathworks.com/matlabcentral/fileexchange/20321

us

14 May 2009 show_colors.m generates a labeled plot showing all colors recognized by RGB.m Author: Phillip M. Feldman us

unfortunately, this script does not run due to missing functions

- cell2num
- fig

us

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

06 May 2009 findsubmat Finds one matrix (a sub-matrix) within another. Author: Matt Fig us

observing a master carving out an outstanding masterpiece of a master's workmanship...
us

05 May 2009 findsubmat Finds one matrix (a sub-matrix) within another. Author: Matt Fig us

- very nice: help, example, commented and intelligent engine, acknowledgement of input by another user (excellent academic behavior)...
- BUT: unfortunately, it does NOT (yet) handle NANs - nor does it give a warning/error message...
- a workaround could be to replace NANs with a unique value not found in either data set (we did this in FEX:FPAT:id:6070)...
us

24 Apr 2009 Publish to MediaWiki A stylesheet to make MATLAB publishing produce MediaWiki markup as an output. Author: Matthew Simoneau us

matthew, correct...
however, your file's extension is XML...
urs

22 Apr 2009 Publish to MediaWiki A stylesheet to make MATLAB publishing produce MediaWiki markup as an output. Author: Matthew Simoneau us

works very well; BUT there's a small type in the sample usage:
mediawiki.xsl
should read
mediawiki.xml
just a thought
urs

22 Apr 2009 Publish to MediaWiki A stylesheet to make MATLAB publishing produce MediaWiki markup as an output. Author: Matthew Simoneau us

16 Apr 2009 hs: a pedestrian history search engine hs searches the command history for patterns Author: us us

yuri, i do not understand this error - GREP is embedded into HS...
if you
     type hs
you should see this line at the end (-2 two lines)

%$SSC_INSERT_END 29-Aug-2008/17:29:29 F:/usr/matlab/unix/grep.m

can you give more information...
urs

08 Apr 2009 contest clock joke visualization of solitaire contest Author: Rafal Kasztelanic us

no comprehensible H1 line, no help section, no example(s), loads a file, which the typical ML user does not have and, therefore, causes an error right away...

zegar
??? Error using ==> load
Unable to read file contest_data: No such file or directory.

however, first and foremost, requires an expensive toolbox to run, which is simply unheard of of any former coding contest...

no appreciable benefit to any ML user...
 
us

08 Apr 2009 Been there done that Depicting the progression of code originality. Author: Rajiv Narayan us

no comprehensible H1 line, no help section, no example(s), loads a file, which the typical ML user does not have and, therefore, causes an error right away...
us

08 Apr 2009 Spring 2009 MATLAB Contest - creativity2 Added another graph to Rafal Kasztelanic's creative entry. Author: Nicholas Howe us

no H1 line, no help section, no example(s), loads a file, which the typical ML user does not have and, therefore, causes an error right away...
us

08 Apr 2009 Code overlap The aim here is to visualize the degree of overlap between all pairs of entries in the contest. Author: Rajiv Narayan us

no H1 line, no help section, no example(s), loads a file, which the typical ML user does not have and, therefore, causes an error right away...
however, first and foremost, requires an expensive toolbox to run, which is simply unheard of of any former coding contest...

us

08 Apr 2009 Finding the Similar Entries: A Quantitative Approach based on CPU Runtime Behavior Entry to Matlab contest Spring 2009 Author: C Jethro Lam us

contains bsxfun
(clashing with ML's stock function of the same name:
Warning: Function ...\bsxfun.m has the same name as a
MATLAB builtin. We suggest you rename the function to avoid a potential
name conflict.
) created by james tursa - but he is not being acknowledged anywhere in this submission for his nice contribution...

a collection of incomprehensible functions, which yield this when run one by one
help code
No help found for code.m.
code
??? Input argument "board" is undefined.
help compute_clam_sig
  Filename: compute_clam_sig.m
  Author: C Jethro Lam, jethrolam@gmail.com
  Date: 4/4/2009
  Purpose: Compute the clam signature of an entry
 compute_clam_sig
??? Input argument "entry_id" is undefined.
help compute_correlation
  Filename: compute_and_plot_correlation.m
  Author: C Jethro Lam, jethrolam@gmail.com
  Date: 4/4/2009
  Purpose: Compute and plot the correlation matrix
compute_correlation
?? Input argument "d" is undefined.
help filterByAuthor
No help found for filterByAuthor.m.
filterByAuthor
??? Input argument "d" is undefined.
help main_publish
  Finding the Similar Entries: A Quantitative Approach based on CPU Runtime Behavior
  Chunwei Jethro Lam, jethrolam@gmail.com, April 8 2009
    Published output in the Help browser
       showdemo main_publish
main_publish
??? Error using ==> load
Unable to read file contest_data: No such file or directory.
help mostActive
No help found for mostActive.m.
mostActive
??? Input argument "s" is undefined.
help prepareData
No help found for prepareData.m.
prepareData
??? Error using ==> load
Unable to read file contest_data.mat: No such file or directory.
help test_code
  Entry ID: 42204. Author: JohanH
test_code
??? Index exceeds matrix dimensions.

what - does anyone think - is the average ML user gain from this...

us

 

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