Runing a FoxH code in Mathematica

I would like to ask if I have a Mathematica code of a specific function and I need to use this code in Mathematica to get some values of this function, How Can I do this? I tried to copy the code into new notebook file but unfortunatelly it did not work
Please help me to solve this problem, because I am new in using Mathematica
Thanks in advanced

For example, I define a function and setup the tool to table some values. I hope this is what you wish. Otherwise please post an example. Thank you.

(* iabraham, Mathematica 7.0.1.0, Win-7-64b *)
Clear["Global`*"]; (* Clear memory *)

f[x_] := Sin[x] x; (* Define the function *)
Table[ f[x],{x, 0, Pi, Pi/4}] (* Tabulate some values *)

Thank you very much for your reply Mr. Abraham,
the code have too many steps to implement the function that I need, It is the Fox-H function if you know it,
I attached the paper that includes the code (in its appendix), I would like to know how to use any written code in Mathematica.
Thanks in advanced

Perhaps this page will help:

http://community.wolfram.com/groups/-/m/t/57378?p_p_auth=WbudQ3olhttp://community.wolfram.com/groups/-/m/t/57378?p_p_auth=WbudQ3ol

Thank you Mr. Hardesty for this link, the problem that I face is how to run such codes in Mathematica, is it to copy the code to a file.nb and just define the variables, or there is something to do with these codes
Thanks again

CAREFULLY type the Mathematica code from Appendix A of the paper you linked to into a new empty Mathematica notebook page, or perhaps find the author has a .nb file on the net with this already done. Every character in this must be exactly correct.

Then save the notebook for later use using File Save.

Then on a new separate line type FoxH[ a,b,z ] where you replace those a,b,z with appropriate numbers and then hold down the shift key while pressing the Enter key. It should calculate for a while and display the result. Choose numbers where you can check the result at first.

This is a very simple example

FoxH[a_,b_,z_]:=2*a-b+z;
FoxH[3,7,12]

If I enter that into a notebook and press <shift><enter> it will evaluate the definition of the FoxH function and then use that function to calculate the value 11. But you must substitute the actual FoxH code from the Appendix A.

Thank you very much Mr. Simpson for your comment, I try this:

FoxH[{{{1 , 1/2}}, {{1/2 , 3}}}, {{{0, 1}}, {{1/2 , 2}}}, 0.1]

but the output is

FoxH(({1,1/2}{1/2,3} ),({0,1} {1/2,2}),0.1)

so the function does nothing !!!
Do you have any idea about that?
Thanks in advance.

I must tell Mathematica the definition of FoxH and evaluate this and then use the definition of FoxH.

Here is what I see when I evaluate each line of my notebook with <shift><enter>

In[1]:= FoxH[a_, b_, z_] := 2*a - b + z;

In[2]:= FoxH[{{{1, 1/2}}, {{1/2, 3}}}, {{{0, 1}}, {{1/2, 2}}}, 0.1]

Out[2]= {{{2.1, 0.1}}, {{0.6, 4.1}}}

Perhaps this tutorial can help you better understand how to use functions in Mathematica.

http://reference.wolfram.com/mathematica/tutorial/DefiningFunctions.html

Attached is a copy of my notebook which you can download and also try

Thanks again for your quick reply,
I understood your example and I used it, so I got the idea of using such a function,
but I think there is something that I have not understand when I used the code in the paper specifically how to define the input variables, where the function do nothing when I define its variables, so I am trying now hoping there will some results
Thanks again,
I appreciate your help

If you can make a post and attach a small notebook containing your code and explain what is not working then perhaps someone can help.

Thank you very much Mr. Simpson for your great suppurt, I attached the code below
Thanks again

Ah, thank you. I apologize for not seeing your post with the attached notebook.

If I open that notebook and evaluate the large cell containing the definition of FoxH and then evaluate your cell trying to use FoxH I get the same result that you do.

In[9]:= FoxH[{{{-2,1}}},{{{0,1}}},-0.5,
OptionsPattern[{FoxHFractionTolerance,FoxHDuplicationLimit,FoxHWorkingPrecision}]]

Out[9]= FoxH[{{{-2,1}}},{{{0,1}}},-0.5,OptionsPattern[{FoxHFractionTolerance,FoxHDuplicationLimit,FoxHWorkingPrecision}]]

When Mathematica returns the expression you just evaluated and does not change it that usually means that Mathematica does not understand how to do that. Many new users are confused when it does this and does not print a message explaining.I am very puzzled by this and spend time trying to find what mistake I might have made. I carefully check spelling and capitalization and {} and find nothing.

I find and read this
https://reference.wolfram.com/mathematica/ref/character/RightArrow.html
and I change the seven “right arrow” unicode characters in the code to the two characters → which Mathematica will understand as a “Rule” construct.

I read this and look at the examples
http://reference.wolfram.com/mathematica/ref/OptionsPattern.html
I then try this, also using → which Mathematica will understand as a “Rule” construct.

FoxH[{{{-2,1}}},{{{0,1}}},-0.5,{FoxHFractionTolerance->0.001,
FoxHDuplicationLimit->50,FoxHWorkingPrecision->$MachinePrecision}]

and it gives a variety of errors, but I suspect those are “good” errors and reflect the very simple example data that you used.

Please make these changes and see if you get the same results. Then try using data which will give a result that you can verify and see if this works.

There are more things about the Options which I think may need further changes, but you should be able to get started using the code.
I believe it is possible, if you wish to use the default values for options, to do this

FoxH[{{{-2, 1}}}, {{{0, 1}}}, -0.5]

I made what you had suggested, and the results appear better than the first time, I think there may some mistakes in writing this code, because I copied every line from the paper and put it into the notebook file, the 'right row" problem is one of that, I am going to rewrite it again without copying from the paper hoping it will do better and try to solve the errors that appear.
Thank you very very much Mr. Simpson for all of your help.

This is the latest version of this code, if anyone need to have a look on it
Thanks in advanced

In the Foxh.nb attached to the previous message I find the following.

If I have not introduced any errors in opening your notebook on my system

Inside the next to last Do loop you have Z=ZPower and that should be Z=Z Power (with a space or even * between those)
Inside the next to last Do loop you have G=GSqrt and that should be G=G Sqrt (same)
Inside the last Do loop you have Z=ZPower and that should be Z=Z Power (same)

I do not see any additional differences between your code and the pdf paper, but I might have missed some.

I assume you are working on the rest of the code in the Module from the paper.

Thank you Mr. Simpson,
I checked it again and corrected some mistakes which similar to what you had mentioned in you last reply.
The code still not runing correctly, but I am trying to see some solution hoping it will run better.
Thank you again for all helps and supports

I am very glad you are making progress on your problem. I am impressed.

Do you know of a set of very simple inputs to FoxH where you know what the result should be?
Or perhaps even know what some of the subcalculations inside FoxH should be?

If you are able to provide that then perhaps it will be possible to help track down and fix more problems.

I have a reference about H-function which I used in my works, there are many simple cases of H function that can be solved with some calculations like eq.1.43 in the reference [16 in case of H_{1,1}^{1,1}=[-0.5|{-2,1};{0,1}] ]. The authors of the paper that includes the Mathematica H-function code are expert in their field and I am sure that this code is totally true, but the main problem is how to use it correctly, as you saw there was some mistakes when I wrote the code, and may be there are some others, I am trying to understand each step in the code, hoping I will get something interesting.
Thank your again Mr. Simpson

Reference:

Good news,
The code is working well now, and I tested some H-function and I got true results,
I would like to thank every one who helped me to solved some problems, especially Mr. Bill Simpson for his great help and supports

Dear Hosam rh,
Would you mind sending me your final version of this Fox H function? I am also facing the same problem with you in typing the code in that paper.
Please help me for overcoming this problem.
Thanks in advance.