I have use the following command to save a table called "matrix_name" as a .m file named "matrix.m":

Save["matrix.m", matrix_name]

After this file is created, I try to run it from another mathematica notebook using the following command:

<< matrix.m;

but I get the message

Get: Cannot open matrix.m

Why is this happening?

  • 2
    $\begingroup$ Did you change the Directory[] in a meanwhile? Works fine on Win V12.1 $\endgroup$
    – Kuba
    Oct 7, 2020 at 11:39
  • $\begingroup$ @Kuba Hi, thanks for the comment. No, I didn't change anything. I'm new to this so I didn't know I should've done this. How can I do this? $\endgroup$ Oct 9, 2020 at 15:18
  • $\begingroup$ No no, you should not, my point was that unless you've done something with Directory[] it should just work. Can you list step by step way to reproduce it starting from a fresh session? $\endgroup$
    – Kuba
    Oct 12, 2020 at 6:54


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.