Group Abstract Group Abstract

Message Boards Message Boards

0
|
75 Views
|
5 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Struggling to convert imported formula to function

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?

Attachments:
POSTED BY: Patrick McMullen
5 Replies

Does this work well for you?:

Clear[t];
deOLD = dE; (* assuming you've done the Import[] *)
ClearAll[dE];
dE[t_] = deOLD; (* = here, not := *)
POSTED BY: Michael Rogers

Thank you.

POSTED BY: Patrick McMullen
Posted 3 days ago
POSTED BY: Eric Rimbey

Thank you. I knew I could work around the issue, but I just wanted to make sure I could convert it to a function.

POSTED BY: Patrick McMullen

POSTED BY: Patrick McMullen
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard