0
votes

I am new to Matlab and would appreciate any help with this problem.

I want to solve for a few Hypergeometric functions, but R2007b version of Matlab doesn't seem to know that there is a hypergeom function. (I will show you the simplest form of the code and the error message that I get)

(in file Untitled2just.m)

clear;
hypergeom([2, 16],[3,1],-7);

ERROR 
??? Attempt to execute SCRIPT Hypergeom as a function:
F:\INTERSNHIP at RRI\Matlab\Hypergeom.m

Error in ==> Untitled2just at 2
hypergeom([2, 16],[3,1],-7);

(F:\INTERSNHIP at RRI\Matlab\Hypergeom.m - this is another file that has hypergeom function, and saved with the name Hypergeom.m )

Is there anyway I can get hypergeom function to work on Matlab R2007b version?

Thanks for helping.

1

1 Answers

0
votes

The function hypergeom is part of the Symbolic Math Toolbox and may not be available to you if you only have the basic R2007b.

Normally if you try to run a function that doesn't exist you get an error.

??? Undefined function or method 'hypergeom'

The error you get is due to the fact that you have a local script named Hypergeom.m.

So at your call

hypergeom([2, 16],[3,1],-7);

Matlab recognize that there is a script of function in your path that matches the name. But your local file is a script and not a function. Also see the precedence order in Matlab.

So to fix it, either check how to use your local script (perhaps it reads inputs from the workspace) or acquire the Symbolic Math toolbox.