You are here

Freemat portable help.

2 posts / 0 new
Last post
tal
Offline
Last seen: 1 year 2 months ago
Developer
Joined: 2009-08-07 07:34
Freemat portable help.

Hi all,
I am now using at freemat (yes, I have homework at numeric analysis)
and i try to use a simple function to understand how to add a new function to freemat.

I follow this guide:
Tutorial Make a Function

and I copy to test.m file that code:
function return_value=comb(n,r)
return_value=gamma(n+1)/(gamma(n-r+1)*gamma(r+1));

and save it at:
'E:\PortableAppsMenu\PortableApps\FreeMatPortable\Data'
I also add the this folder(and sub folder) with path tool like it say in the guide.

and then call to the function with this commend like in the example:
comb(7,3)

and it say this error massage:
Error: Undefined function or variable comb.

can you help me?

thanks for your time.
Tal.

tal
Offline
Last seen: 1 year 2 months ago
Developer
Joined: 2009-08-07 07:34
Found the solution.

the file name is needed to be the same as the function name.
(I found this error when using matlab and it fix that for me).
in that case, can it possible to add to freemat the folder:
X:\...\FreeMatPortable\Data to tool path with i parameter?
FreeMat -i folder
not sure, i didn't test it.

thank you.
Tal.

Log in or register to post comments