Group Abstract Group Abstract

Message Boards Message Boards

0
|
3.9K Views
|
2 Replies
|
4 Total Likes
View groups...
Share
Share this post:

How to have functionality of an include file?

Posted 5 years ago
POSTED BY: Richard Frost
2 Replies
Posted 5 years ago
POSTED BY: Rohit Namjoshi

Thank you Rohit, this is very helpful. I did need to EVALUATE BEFORE SAVING, and then the .m file was automagically produced. Here's my test run -- I'm extremely happy!

In[1]:= X = {{1, 2, 3.2, 1.5}, {1.2, 1, 3.1, 2}};

In[2]:= Y = {{1, 1, 3.1, 1.2}, {1, 2, 3, 2}};

In[3]:= Get[
  "C:\\Users\\Authorized User\\Documents\\SSR Distance \
measures\\Measures\\Bray-Curtis.m"];

In[4]:= {distanceFunc[X, Y], distanceUnits}

Out[4]= {9.21502, "100BC"}

In[5]:= Get[
  "C:\\Users\\Authorized User\\Documents\\SSR Distance \
measures\\Measures\\Frobenius.m"];

In[6]:= {distanceFunc[X, Y], distanceUnits}

Out[6]= {14.6629, "10F"}
POSTED BY: Richard Frost
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard