I want to run the Mathematica file with some extension, like '.m'. But, I don't know, how can I run the code. Please, guide me.
closed as off-topic by István Zachar, Henrik Schumacher, Carl Lange, MarcoB, m_goldberg Apr 6 at 0:18
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This question cannot be answered without additional information. Questions on problems in code must describe the specific problem and include valid code to reproduce it. Any data used for programming examples should be embedded in the question or code to generate the (fake) data must be included." – István Zachar, Henrik Schumacher, Carl Lange, MarcoB
If a file has the extension
.m, then I assume you are trying to load a package into your notebook. This can be achieved by calling the package (say called PackageName.m) into your own notebook by doing the following:
You can type into your opening like
<<PackageName`, which uses the backtick symbol
`. It is probably at the left hand side of your keyboard.
Alternatively, this is a shortcut for the MMA function
Get, given in the documentation here. The first example has the above notation I was talking about. Then
Here is a screenshot so you can see the backtick in action.