I saved some modules into the same package or notebook which I call ModuleLibrary.m
I then get/call this package using Get[DirectoryPath\ModuleLibrary.m]
in my actual analysis notebook.
However when I come to use some module, it doesn’t work. Mathematica behaves as though the called module is uninitialised E.g. If I go MyModule[Data]
I just get the output MyModule[{{x1,y1},{x2,y2},{x3,y3}...}]
rather than the actual result.
The modules themselves definitely work as I can use them inside the ModuleLibrary.m
file itself, and they behave as expected.
The package itself is laid out as:
BeginPackage["MyPackageName`"] Begin["`Private`"]; MyModule1[x,y]:=Module[Some code here...] End[]; Begin["`Private`"]; MyModule2[x,y]:=Module[Some code here...] End[]; Begin["`Private`"]; MyModule2[x,y]:=Module[Some code here...] End[]; EndPackage[];