Running file with some extensionHow to install packages?How to execute a function in the package from java?Command line execution of Mathematica notebooks and conversion to .mHow to load a custom mathematica package from a .m file?How do I correctly embed VerificationTests in my packages?User defined packages don't load with Needs or GetHow can I install packages distributed as .paclet files?How to install custom packageChess in MathematicaLocalSubmit and package functionsCMD method to convert .nb file into .m file
What is this high flying aircraft over Pennsylvania?
Highest stage count that are used one right after the other?
Should a narrator ever describe things based on a character's view instead of facts?
Why is participating in the European Parliamentary elections used as a threat?
Can a Knock spell open the door to Mordenkainen's Magnificent Mansion?
Sort with assumptions
How to split IPA spelling into syllables
Writing in a Christian voice
What is it called when someone votes for an option that's not their first choice?
How to get directions in deep space?
If the Dominion rule using their Jem'Hadar troops, why is their life expectancy so low?
Weird lines in Microsoft Word
Exposing a company lying about themselves in a tightly knit industry (videogames) : Is my career at risk on the long run?
Why is implicit conversion not ambiguous for non-primitive types?
A seasonal riddle
Trouble reading roman numeral notation with flats
New Order #2: Turn My Way
1 John in Luther’s Bibel
Asserting that Atheism and Theism are both faith based positions
Air travel with refrigerated insulin
Why is indicated airspeed rather than ground speed used during the takeoff roll?
Reason why a kingside attack is not justified
Connection Between Knot Theory and Number Theory
Do native speakers use "ultima" and "proxima" frequently in spoken English?
Running file with some extension
How to install packages?How to execute a function in the package from java?Command line execution of Mathematica notebooks and conversion to .mHow to load a custom mathematica package from a .m file?How do I correctly embed VerificationTests in my packages?User defined packages don't load with Needs or GetHow can I install packages distributed as .paclet files?How to install custom packageChess in MathematicaLocalSubmit and package functionsCMD method to convert .nb file into .m file
$begingroup$
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.
packages
New contributor
$endgroup$
add a comment |
$begingroup$
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.
packages
New contributor
$endgroup$
2
$begingroup$
Have a look atGet
.
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
To keep it simple, pass the full path to the file to theGet
function. That's all.
$endgroup$
– Szabolcs
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday
add a comment |
$begingroup$
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.
packages
New contributor
$endgroup$
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.
packages
packages
New contributor
New contributor
edited 2 days ago
J. M. is slightly pensive♦
98k10305465
98k10305465
New contributor
asked 2 days ago
Misbah ShahzadiMisbah Shahzadi
162
162
New contributor
New contributor
2
$begingroup$
Have a look atGet
.
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
To keep it simple, pass the full path to the file to theGet
function. That's all.
$endgroup$
– Szabolcs
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday
add a comment |
2
$begingroup$
Have a look atGet
.
$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
To keep it simple, pass the full path to the file to theGet
function. That's all.
$endgroup$
– Szabolcs
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday
2
2
$begingroup$
Have a look at
Get
.$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
Have a look at
Get
.$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
To keep it simple, pass the full path to the file to the
Get
function. That's all.$endgroup$
– Szabolcs
yesterday
$begingroup$
To keep it simple, pass the full path to the file to the
Get
function. That's all.$endgroup$
– Szabolcs
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday
add a comment |
1 Answer
1
active
oldest
votes
$begingroup$
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. ThenGet["PackageName.m"]
would work.
Here is a screenshot so you can see the backtick in action.
$endgroup$
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
|
show 3 more comments
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
);
);
, "mathjax-editing");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "387"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Misbah Shahzadi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193413%2frunning-file-with-some-extension%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
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. ThenGet["PackageName.m"]
would work.
Here is a screenshot so you can see the backtick in action.
$endgroup$
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
|
show 3 more comments
$begingroup$
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. ThenGet["PackageName.m"]
would work.
Here is a screenshot so you can see the backtick in action.
$endgroup$
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
|
show 3 more comments
$begingroup$
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. ThenGet["PackageName.m"]
would work.
Here is a screenshot so you can see the backtick in action.
$endgroup$
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. ThenGet["PackageName.m"]
would work.
Here is a screenshot so you can see the backtick in action.
edited 2 days ago
J. M. is slightly pensive♦
98k10305465
98k10305465
answered 2 days ago
BradBrad
2512
2512
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
|
show 3 more comments
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
Thank you so much for your kind response. Are you talking about this symbol '' ~ ''. I just type "<<PackageName(~)" in the notebook, but it does not work. I also type ''<<~'', it also does not work. Sorry to say, I am facing difficulty to learn from the example.
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
$begingroup$
I have added a screenshot. You are on the right key I think, but instead you have held-down shift instead. It's a tricky key to type, but my screenshot should help you.
$endgroup$
– Brad
2 days ago
1
1
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
It's tricky but: enclose any code that has backticks in double backticks. I did this for your answer.
$endgroup$
– J. M. is slightly pensive♦
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
@J.M.isslightlypensive that's one of the worst things that to look at - 5 backticks is far too many. Thanks for your help JM.
$endgroup$
– Brad
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
$begingroup$
Now, I followed your suggestions and type. But, I found the error. I am pasting here both input and output which I got. In[8]:= <<PackageName` Get["PackageName.m"] During evaluation of In[8]:= Get::noopen: Cannot open PackageName`. Out[8]= $Failed During evaluation of In[8]:= Get::noopen: Cannot open PackageName.m. Out[9]= $Failed
$endgroup$
– Misbah Shahzadi
2 days ago
|
show 3 more comments
Misbah Shahzadi is a new contributor. Be nice, and check out our Code of Conduct.
Misbah Shahzadi is a new contributor. Be nice, and check out our Code of Conduct.
Misbah Shahzadi is a new contributor. Be nice, and check out our Code of Conduct.
Misbah Shahzadi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Mathematica Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f193413%2frunning-file-with-some-extension%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
2
$begingroup$
Have a look at
Get
.$endgroup$
– Henrik Schumacher
2 days ago
$begingroup$
To keep it simple, pass the full path to the file to the
Get
function. That's all.$endgroup$
– Szabolcs
yesterday
$begingroup$
what is ''Get''? There is no link. I can't open this. How can I pass the full path to the file? Can you help me Please? I have Mathematica 11.3 in my system. But, not able to run the code in file with extension ''.m''.
$endgroup$
– Misbah Shahzadi
yesterday
$begingroup$
Please help me. Actually I don't know about packages. So, I am facing difficulties.
$endgroup$
– Misbah Shahzadi
yesterday