0
$\begingroup$

I have the following Mathematica notebook on this link notebook

I was told that the binary wolframscript couldn't understand some complex functions of Mathematica.

First, I would you like to convert this notebook file to .wls format and be able to run it directly on terminal.

Is it possible that wolframscript execute the converted notebook, even if this latter uses complex functions like DSolve or other functions that doesn't exist natively in Wolfram script language ?

$\endgroup$
10
  • $\begingroup$ Welcome to MSE. wolframscript and evaluate any WL expression that does not involve specific front-end functionality. DSolve will work fine. $\endgroup$ Commented Apr 1, 2022 at 12:45
  • $\begingroup$ @RohitNamjoshi . Thanks for your quick answer. Unfortutanely, I can't manage to convert the file given in the link of my post above. For the moment, if I perform a "Save as..." under format .wls, I have all the command lines commented, I don't understand why. If you could indicate me how to convert the notebook to a working .wls file, this would be fine. Regards $\endgroup$
    – youpilat13
    Commented Apr 1, 2022 at 13:03
  • $\begingroup$ Only Initialization cells are saved without comments in .wls or .m, .wl. Select all the input cells you want to save then Ctrl+8 on a Mac or from the menu Cell / Cell Properties / Initialization Cell. $\endgroup$ Commented Apr 1, 2022 at 13:14
  • $\begingroup$ @RohitNamjoshi . Is there a way to convert in an automatic way the notebook to Wolframscript by doing systematically the trick Ctrl+8 for all input cells in notebook ? $\endgroup$
    – youpilat13
    Commented Apr 5, 2022 at 18:48
  • $\begingroup$ Evaluate NotebookFind[EvaluationNotebook[], "Input", All, CellStyle]. That will select all Input cells, then Ctrl+8 to set them all to Initialization cells. $\endgroup$ Commented Apr 6, 2022 at 2:08

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.