Rank: 4248 based on 27 downloads (last 30 days) and 2 files submitted
photo

Mischa Tolsma

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Mischa Tolsma View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
25 Jan 2002 quad_M;quadl_M numerical integration with vector arguments Author: Mischa Tolsma integration, numerical integration, quad, optimized, vector arguments 13 3
  • 4.0
4.0 | 3 ratings
24 Jan 2002 Poissrnd Speed optimized version of poissrnd Author: Mischa Tolsma statistics, probability, poisson, random, speed, optimized 14 3
  • 3.5
3.5 | 3 ratings
Comments and Ratings on Mischa Tolsma's Files View all
Updated File Comment by Comments Rating
21 Apr 2008 quad_M;quadl_M numerical integration with vector arguments Author: Mischa Tolsma

I seem to get errors with this ....

> [q,f] = quad_M(c4,100,100)
??? Error using ==> fcnchk
FUN must be a function, a valid string expression,
or an inline function object.

Error in ==> quad_M at 83
f = fcnchk(funfcn);

I thought it could take vectors ... ?

14 Dec 2006 Poissrnd Speed optimized version of poissrnd Author: Mischa Tolsma

It's in the MatLab reference; "break is not defined outside a for or while loop. Use return in this context instead." =P

14 Dec 2006 Poissrnd Speed optimized version of poissrnd Author: Mischa Tolsma

Jarek is right, there are some issues, I'm not sure why the "break" statement doesn't work except maybe the function is expecting an output, so a "return" is needed. Other issues:

1) Rename Poissrnd.m to poissrnd.m, MatLab likes cases to match between the function name and the file, that should fix of Jarek's #4 issue.
2) On line 136, a "(" is misplaced, replace "if prod(size(lambda) == 1)" with "if prod(size(lambda)) == 1". This way, you are comparing the product of the row and column size of lambda to 1. The original line is trying to compare size of lambda to 1, but take the product of the comparison; which is not a correct input argument for "prod".

Other than that, thanks, saved me a trip home getting the file.

09 Aug 2006 Poissrnd Speed optimized version of poissrnd Author: Mischa Tolsma

Good useful code with many small annoyances. Needs tinkering to get to work. Some problems I run into with R2006a:
1) Error in line 82 a BREAK statement appeared has to be replaced with RETURN.
2) Error in line 136: something about 'prod' is not defined 'logical' values. To fix replace the whole ?prod()? statement with 0.
3) Name conflict with Matlab?s poissrnd ? had to rename function to something else to get to work without warnings.
4) Poissrnd(0) returned NaN while poissrnd(0) returned 0. More changes needed to fix.

After all those changes code worked fine.

29 Mar 2004 quad_M;quadl_M numerical integration with vector arguments Author: Mischa Tolsma

Contact us