0

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.

Sjoerd C. de Vries
  • 65,815
  • 14
  • 188
  • 323

2 Answers2

2

webMathematica is one option, but I think CDF would be the easiest way to do this. Check out http://education.wolfram.com/ and http://demonstrations.wolfram.com/ 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?

Kyle Keane
  • 212
  • 1
  • 5
1

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];
Manipulate[Column[{
   InputField[Dynamic[r1], String],
   InputField[Dynamic[r2], String],
   InputField[Dynamic[r3], String],
   Row[{
     Dynamic@
      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.

bobthechemist
  • 19,693
  • 4
  • 52
  • 138