Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to create a matrix calculator and graph tools for our website and was wondering if there is a way to create Wolfram API or Widgets based on a Mathematica notebook.

share|improve this question
Take a look at webMathematica. – Szabolcs Mar 22 '13 at 0:46
Wolfram|Alpha lets you develop widgets. But you'd have to define them using the Wolfram|Alpha "language"... – cormullion Mar 22 '13 at 12:33
To create a CDF that is embedded into a web page you could use (Mma version 9) the File / CDF Export / Web Embeddable... menu item. The online documentation is here. – Stephen Luttrell Mar 22 '13 at 19:01
probably with the future – P. Fonseca Mar 28 '13 at 7:58

webMathematica is one option, but I think CDF would be the easiest way to do this. Check out and for examples. For instructions see this similar question on stackexchange How can I embed a Manipulate (or other interactive graphics) in my website using CDF?

share|improve this answer

Making a matrix calculator with the FreeCDF options will be very challenging, since data input via fields such as InputField apparently are not allowed. The following code works with PlayerPro (the enterprise edition)

Clear[r1, r2, r3];
   InputField[Dynamic[r1], String],
   InputField[Dynamic[r2], String],
   InputField[Dynamic[r3], String],
      function@(ToExpression /@ StringSplit[#, " "] & /@ {r1, r2, 
          r3}) }]
   }], {{function, Transpose}, {Transpose, Inverse, Det}}, 
 Initialization :> (r1 := "1 2 3"; r2 := "4 2 2"; r3 := "5 1 7";)]

The input fields want space separated values and there is no error checking. With the FreeCDF you will not be able to change the default values in the InputField. If you have some restrictions on your matrix, then you could substitute input fields for sliders, which would be allowed in the FreeCDF version. The interface would get very cumbersome for large matrices, however.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.