1
$\begingroup$

I have a conducted trigonometric manupulations to solve the geometry relations of a mechanism. For this purpose, i use a lot the FullSimplify function. This function makes for me very good simplifications. But, this function is very long. My code lasts 45 min. This is thus not all convenient to work of it.

A idea is to store the expressions which result from the simplifications so that i needn't to reevaluate it each time.

How can i do to store expressions in a notebook so that i could them directly with reevaluating all my notebook ?

Thanks you for you tips.

$\endgroup$

closed as off-topic by Feyre, m_goldberg, MarcoB, march, Jens Dec 31 '16 at 19:05

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Feyre, m_goldberg, MarcoB, march, Jens
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    $\begingroup$ Export[],Import[]? $\endgroup$ – Feyre Dec 29 '16 at 13:57
  • $\begingroup$ May be but can you develop a little bit more with a short example ? $\endgroup$ – Bendesarts Dec 29 '16 at 14:02
  • $\begingroup$ Simply store the result in a variable. a=FullSimplify[],Export["name.txt",a]. Then you can import with a=Import["name.txt"] $\endgroup$ – Feyre Dec 29 '16 at 14:19
  • 2
    $\begingroup$ Look up Save[] and DumpSave[]. And Get[]. $\endgroup$ – Michael E2 Dec 29 '16 at 14:34
  • 2
    $\begingroup$ I suggest you read the Documentation Center article PersistentStorage $\endgroup$ – m_goldberg Dec 29 '16 at 15:46
4
$\begingroup$
y = Simplify[{Sin[x]/Cos[x], 1 - Tanh[x]^2}]

$\left\{\tan (x),\text{sech}^2(x)\right\}$

Export["expr1.m", y]

expr1.m

y1 = Import["expr1.m"]
Plot[y1, {x, 0, 2 Pi}]

$\left\{\tan (x),\text{sech}^2(x)\right\}$

enter image description here

you can open and check expr1.m for your expressions.

$\endgroup$

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