MathGroup Archive 2012

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Executing function on Mathematica 8

  • To: mathgroup at smc.vnet.net
  • Subject: [mg124672] Re: Executing function on Mathematica 8
  • From: David Bailey <dave at removedbailey.co.uk>
  • Date: Tue, 31 Jan 2012 05:34:04 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <jg5q6j$h3s$1@smc.vnet.net>

On 30/01/2012 10:08, Fadi Mousa wrote:
> Dear mathematica members,
>
> I am new to mathematica and do not know how to enter the following
> function and then call it on mathematica 8:
>
> BinExp[num_,d_] := Module[{n,L},
> If[d>  $MaxPrecision, $MaxPrecision = d];
> n = N[num,d];
> L = First[RealDigits[n,2]]
> ];
>
> Any help is appreciated,
>
> Best Regards,
> Fadi Abu-Amara
>
I assume you are simply asking about the manual process of entering and 
using this function, and that you are working on Windows.

1)     Start Mathematica.

2)     An empty window will appear (possibly after you have dismissed 
the beginner help box).

3)     Click in that window and type in your function, using the Return 
key for the newlines.

4)     Click anywhere in your function and press the ENTER key, or 
Shift-Return. This will submit the function to kernel, and it may 
produce some syntax errors. If you get these, fix them and submit the 
result to the kernel again.

5)     Click further down the window, to obtain a thin line across the 
window, indicating that what you type next will be an input cell - then 
type in a test call to your function.

6)     Click into the test, or just leave the cursor at the end of the 
line, and execute it using ENTER or Shift-Return as above.

7)     ********** Use the File/Save menu item to save your notebook - 
you don't want to start from scratch every time.*************

The results should appear.

As a final thought, if you have access to one of the old Mathematica 
books - version 5, or even 4.2 will do - read it. A few things have 
changed in later versions, but you will find it easier to pick up the 
basics of working with notebooks from the printed book.

David Bailey
http://www.dbaileyconsultancy.co.uk




  • Prev by Date: Locator-set Bezier curves mapped to 3D surface
  • Next by Date: Re: Unrelated variable affects rsolve result
  • Previous by thread: Re: Executing function on Mathematica 8
  • Next by thread: Re: Executing function on Mathematica 8