Search Comments and Ratings

go

Comments and Ratings

   
Date File Comment by Comment Rating
19 Nov 2009 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Medlock, Richard

Duane - yes you are probably correct, the original calculation however was done differently and was shorter. However, the benefit for me personally is two fold - 1) it makes it easier to troubleshoot the code because it's more readable and 2) repetitive calculations are generally best kept as functions which enable you to more easily find and replace them, and avoid mistakes in typing out duplicate code. But everyone has their own preferred way of doing things.

21 Aug 2009 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Hanselman, Duane

How does this save time? Function calling overhead makes this computationally slower than direct multiplication. Typing the function call degrees(theta) is 14 keystrokes whereas 180/pi*theta is only 12 keystrokes. The same is true for typing radians(theta). So how does this save time?

14 Aug 2009 Fix for DAQHWINFO Function to return separate correct lists of input and output soundcard boards. Author: Richard Medlock Medlock, Richard

Hi, thanks for your feedback - really pleased that it helped :)

14 Aug 2009 pickn Return P random picks of N items from an input vector A. Author: Richard Medlock Medlock, Richard

Hi, thanks for your feedback. This file was written well over 4 years ago (before you reviewed it) and at the time there was nothing available that did this. As with all my files they were simple (in my mind) solutions to achieve what I wanted and worked. I posted them in case anyone else found them useful. Perhaps you might consider that in future when rating (very!!) old submissions ;-)

13 Aug 2009 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Joel

Simple

19 Feb 2009 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock Sergio

Also works for 5.3

Great

19 Mar 2008 isodd Checks to see if a number is odd or even. Author: Richard Medlock aanon, aanon

even easier, whole thing

rem(number/2)

true if odd, false if even.

15 Mar 2008 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Smith, Carson

Thanks

02 Mar 2008 isodd Checks to see if a number is odd or even. Author: Richard Medlock St, D

The function would be more efficient if it avoided calculating the "part" variable, avoided using an "if", and just did its job by "x = (a != whole)"

04 Feb 2008 Convert to Cursor Converts image files to cursor CData. Author: Richard Medlock Jahanbin, Reza

Alternatively you can avoid the double loop and reduce the code to the following line:

c2c = nan(size(i,1), size(i,2)); c2c(sum(i, 3)==765) = 2; c2c(sum(i, 3)==0) = 1;

11 Jan 2008 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Kumar, Atul

18 Dec 2007 BIN2HEX Converts Binary strings to HEX Author: Richard Medlock Farmer, Brian

This works great, and I used it with dec2bin first.

09 Nov 2007 UiColorPicker MS Office Style Color Picker Author: Richard Medlock Hans, Jeremy

The best thing is that you can customize it to fit the MS EXCEL color pallate - and if you export data to excel, you don't have to think to much about color conversion.

Works great and solved my problem!
10x!

09 Oct 2007 Fix for DAQHWINFO Function to return separate correct lists of input and output soundcard boards. Author: Richard Medlock Moore, Bethany

Worked great for our lab, and keyed us in to a problem we were having with multiple input-output devices installed. Thanks!

04 Oct 2007 pickn Return P random picks of N items from an input vector A. Author: Richard Medlock x@y.z, Jos

B = A(ceil(numel(A)*rand(P,N))) ;
would do the job much (much!!) faster.
Creating all possible combinations first is very time- and memory consuming ... The retrieval of all combinations of elements is handled much more efficient by other contributions here (search the FEX for "combinations")

29 Aug 2007 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock RPS, padmanaban

good yar

23 Mar 2007 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock onder, olcay

Thanks for help.t's very usefull.

14 Jan 2007 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock Eka Putra, Irnawan

Awesome

12 Dec 2006 isodd Checks to see if a number is odd or even. Author: Richard Medlock Noob, Matlab

alternatively, one could use

isodd=inline('x-2*floor(x/2)','x');

08 Dec 2006 isodd Checks to see if a number is odd or even. Author: Richard Medlock Tolosa, Johan

What is Rasmus review's one liner? Can you post it here please?

Thanks.

18 Nov 2006 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock Lim, Seung-Bin

15 Nov 2006 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock tripathi, vimal

18 Oct 2006 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock smith, eddy

If last comments have not shown me how to count using sum or find your script would be very usefull.
Your script allowed me to find a good solution. Thanks to you and to the reviewers

20 Sep 2006 isodd Checks to see if a number is odd or even. Author: Richard Medlock Dough, John

should there be an "a whole" joke here?

08 Jun 2006 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock Ramachandran, Anil

dude, just use size(find(index == i),1) to find the number of times i exists in index.

20 Feb 2006 pickn Return P random picks of N items from an input vector A. Author: Richard Medlock Wetzel, Matthias

18 Feb 2006 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock van der Geest, Jos

Poor help and worse programming style. This file should be removed.

06 Feb 2006 UiColorPicker MS Office Style Color Picker Author: Richard Medlock Teoh, Jennifer

31 Jan 2006 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock mohd, anuar

Super!!

25 Jan 2006 isodd Checks to see if a number is odd or even. Author: Richard Medlock Serhir, Mohammed

to complicated for simple function

05 Dec 2005 isodd Checks to see if a number is odd or even. Author: Richard Medlock Hanselman, Duane

Works only for scalar inputs when it could easily work for an array of any dimension. Problem made much more difficult than needed. Rasmus review provides a simple one-liner.

09 Sep 2005 GetCurrentValue Returns the current selection in a list box. Author: Richard Medlock Meng, Julie

Good for beginners! Thanks

08 Sep 2005 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock Shvorob, Dimitri

Duplicates built-in FIND.

09 Jun 2005 isodd Checks to see if a number is odd or even. Author: Richard Medlock Cano, Camilo

Great and simple. Thanks.

18 Jan 2005 enable.m / disable.m Helper function to enable/disable uicontrols. Author: Richard Medlock Author, The

Thanks for the feedback, as I said in the descrption it's a "Helper Function" it just saves a bit of time if that's what you need. I found it pretty useful when designing GUI-heavy software for test/measurement applications. It's not meant to be anything more exciting than that.

17 Jan 2005 UiColorPicker MS Office Style Color Picker Author: Richard Medlock Neilson, Kevin

I think this is an improvement over uisetcolor because it's a bit more elegant--you can set your own palette, it's more compact, and you don't have to redundantly press 'return' after selecting the color. -Kevin

29 Nov 2004 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock calderon, ezekiel

if only i knew earlier how to install the file, i would be a lot easier.

09 Jun 2004 Count Counts the number elements in a specified vector that match a specified criteria. Author: Richard Medlock Wegmann, Fabio

Hi I found the lack of a COUNT command quite astonishing. The problem with the solutions offered here is that they 'deliver more than needed' (i.e. position of the element). On a CPU instruction level, this requires an unneeded write to RAM, where an CPU register increment would suffice for the purpose of COUNT. I made three tests with a vector of 64800 elements:

Option 1:
if 1== 1
tic
sum(listeNZ==8)
toc
end

1603 occurences of 8
elapsed time: 0.0051

Option 2:
if 1== 1
tic;
length(find(listeNZ==8))
toc
end

1603 occurences of 8
elapsed time: 0.0038 !!!!!!!! :o (about 30% less time needed)

just for fun:
Option 3:
if 1==1
sums=0;
tic;
for k=1:64800
if listeNZ(k)==8
sums=sums+1;
end
toc
end

1603 occurences of 8
elapsed time: 0.1401 !!!!!!!! :O (about 40 times slower than option 2)

In conclusion, the times needed are too small to worry about, but a COUNT command should really be included in the standard nevertheless... I am really astonished that the length(find()) combo is faster than the sum(), though...

04 Jun 2004 enable.m / disable.m Helper function to enable/disable uicontrols. Author: Richard Medlock namesis, nameless

i want a show and hide :)

it does get quiet tedios to write them especially during debug on the command line, but other than that... not very useful

05 Apr 2004 degrees and radians Two helper functions, one converts degrees to radians, the other rads to deg. Author: Richard Medlock a, a

thank you so much. you helped me out a whole lot.

17 Jan 2004 isodd Checks to see if a number is odd or even. Author: Richard Medlock Camill, Lewis

good...

14 Jan 2004 Convert to Cursor Converts image files to cursor CData. Author: Richard Medlock tyg, tgy

tfg

06 Jan 2004 enable.m / disable.m Helper function to enable/disable uicontrols. Author: Richard Medlock Last, Joke

a joke?

24 Dec 2003 Convert to Cursor Converts image files to cursor CData. Author: Richard Medlock Abu E, Muhammad

it is a tooooooooooo greate

09 Nov 2003 UiColorPicker MS Office Style Color Picker Author: Richard Medlock Athor, The

I already had this conversation with a guy from Mathworks. The UISETCOLOR function is part of the mapping toolbox. It does not come as standard with Matlab. I wasn't aware of this when I wrote this function, as I don't have the mapping toolbox myself.

07 Nov 2003 UiColorPicker MS Office Style Color Picker Author: Richard Medlock Anthin, Rasmus

What's so different with this from the matlab's intrinsic UISETCOLOR function in uitools?

16 Sep 2003 BIN2HEX Converts Binary strings to HEX Author: Richard Medlock DUARTE, VALDENIR

16 Jul 2003 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock Author, The

Yes - this is a problem that really irritates me as well.

I can't figure out why this is at the moment, but if I do I'll post an update.

It doesn't seem to affect other programs e.g. VB.

15 Jul 2003 XP Visual Styles for MATLAB GUIs Skins uicontrols to match windows XP visual style. Author: Richard Medlock Jagers, Bert

Simple and very nice, except for the fact that it makes your slide bar go right when you press the arrow to the left (value property changes properly, i.e. going down).

04 May 2003 ListBoards Returns a list of all available boards for a specified adaptor. Author: Richard Medlock M, R

If you are intending to use this function with winsound devices, it is highly reccommended that you download the WinsoundHwInfo function as well. The Winsound HWinfo function is a fix for a problem with the daqhwinfo function in the DAQ toolbox where in some circumstances it returns incorrect boardIDs for output channels.

 

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