I have successfully imported a formula into Mathematica. The formula is detailed in the “Euclidean.m” file. It is in piecewise form, and I set it equal to “de”, which is how the formula is defined in the file.
I would like to convert this “de” formula to the function dE[t]. When I try to do this, I am told t_ is protected. I have read about this issue, but I am stuck. The fix should be simple, but I am just not seeing it. Relevant files are attached. Any suggestions?
The file Euclidean.m already contains a definition for dE. When you try to define dE[t_]:=de, that dE gets evaluated and so your definition is actually trying to create a downvalue for that entire piecewise expression. But Piecewise is protected, so redefining it isn’t allowed.
You can plot the piecewise function directly:
Plot[dE, {t, 0, 2}]
If you really want a new function, you could do something like this: