Rank: 367 based on 354 downloads (last 30 days) and 25 files submitted
photo

Phillip M. Feldman

E-mail

Personal Profile:

My home page: phillipmfeldman.org


 

Watch this Author's files

 

Files Posted by Phillip M. Feldman View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
18 Aug 2009 extract substring substr extracts a substring of length len from the string str, starting at the specified offset. Author: Phillip M. Feldman string, substring, substr 16 2
  • 4.0
4.0 | 2 ratings
18 Aug 2009 save_to_base.m copies variables from the workspace of the calling function to the base workspace Author: Phillip M. Feldman save variables, base workspace, debugging, evalin 36 5
  • 4.85714
4.9 | 7 ratings
18 Jun 2009 get_yes_or_no Prompt user to provide a yes-or-no answer, with an optional default value. Author: Phillip M. Feldman input, yesorno, binary, choice, boolean, io 12 0
18 Jun 2009 meow.m For cat lovers everywhere. Author: Phillip M. Feldman meow, cat, paws 18 3
  • 4.5
4.5 | 2 ratings
18 Jun 2009 figure window generator fig.m, version 3.1 open a new figure window having specified size Author: Phillip M. Feldman figure, figure window, background and frame ..., rgb 21 0
Comments and Ratings by Phillip M. Feldman View all
Updated File Comments Rating
19 May 2009 choose.m compute number of ways of choosing m objects from n distinct objects Author: Phillip M. Feldman

Darren and John-

Most of what I do with Matlab is simulation. From the standpoint of a simulationist, nchoosek is probably more suitable in the development/debugging stage of a simulation, but once the development and debugging has been done, one wants the code to run as fast as possible. Below are the results of a simple timing comparison of nchoosek and choose:

>> mytime(0); for i=1:1e6; nchoosek(52,13); end; mytime;
19-May-2009 10:45:26 Timer initialized.
19-May-2009 10:46:01 Last step took 35.56 sec.; total elapsed= 35.56 sec.

>> mytime(0); for i=1:1e6; choose(52,13); end; mytime;
19-May-2009 10:46:11 Timer initialized.
19-May-2009 10:46:20 Last step took 8.70 sec.; total elapsed= 8.70 sec.

Note that my function runs over four times as fast as Matlab's builtin function. For the user who invokes nchoosek small numbers of times from the command line, the difference in speed is unimportant. But, when nchoosek or choose is being called millions or tens of milions of times from within a program, the difference becomes important. Please let me know if further explanation is required.

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

Actually, fig is available (separate download). cell2num was missing, but I've submitted it now.

13 May 2009 nextprime For any given number (also vpi numbers), find the next prime number in the sequence of primes. Author: John D'Errico

This code would be more efficient if all values were stored as integers, and all operations were performed on integers. There's no reason to use floating point. Also, the limitation that numbers cannot be larger than 2^32 should be removed. Otherwise, very nice.

12 May 2009 Single-variable linear level finding ("inverse" INTERP1): findX Estimates the XI values at which the dependent variables Y reach a specified level YI. Author: Antoni J. CanĂ³s

Your code is amazingly compact, and I like it better than mine.

I was actually trying to do something slightly different. For discrete-valued sequences, I'd like to be able to exclude cases where the sequence reaches the target level but does not actually cross it. However, this feature of my code appears to not be functioning correctly.

Comments and Ratings on Phillip M. Feldman's Files View all
Updated File Comment by Comments Rating
29 Jul 2014 rms.m compute root-mean-square (RMS) of values supplied as a vector, matrix, or list of discrete values Author: Phillip M. Feldman Hugo

20 May 2014 rms.m compute root-mean-square (RMS) of values supplied as a vector, matrix, or list of discrete values Author: Phillip M. Feldman Montazer

26 Feb 2014 save_to_base.m copies variables from the workspace of the calling function to the base workspace Author: Phillip M. Feldman Bert

26 Feb 2014 save_to_base.m copies variables from the workspace of the calling function to the base workspace Author: Phillip M. Feldman Bert

Thank you very, very much. I use this in combination with xlsread1 and xlswrite2, which require Excel to be in de workspace.

09 Dec 2013 Figure Slideshow Generator The function showfigs() generates a slideshow of all open figures. Author: Phillip M. Feldman Noura Semary

No .fig file found !!!

Contact us