Group Abstract Group Abstract

Message Boards Message Boards

0
|
2.3K Views
|
3 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Package function doesn't plot math function when given as input

Posted 1 year ago
POSTED BY: L P
3 Replies
Posted 1 year ago

Hey, no problem sorry that won't work! I am on Linux (at least the Raspberry Pi distro), which is odd. If you're planning it as something anyone can just fork, perhaps it would be a good idea to just leave out the NoteBookDirectory function, and instead create a subfolder in your repository where packages are? For example: SRC- - Main.wl -Notebook.nb -PACKAGES - Package.wl And then use <<"PACKAGES/Package.wl" (or Needs[]) in your notebook file? That should hopefully enable it to work from scratch, as you said I hope. Although I'm not sure whether that should fix the original problem, I'll try and take a deeper look into it.

POSTED BY: Theo Vine
Posted 1 year ago

Thanks for your answer! I could put in the direct file path to my main file into the directory function, but I'm trying to develop something that can be used as a standalone software. The idea is that every user that clones my repository can just click the Start button and play with it without having to worry about changing anything.

For the

You could otherwise (I believe) just save to the same directory.

part, I'm already working on a repo that contains both .nb and .wl in the same folder, so I guess that is not the case unfortunately.

I believe that the code that I wrote so far isn't exactly fit for this purpose. Any idea on how I could change it?

P.S. are you on Linux? Because a colleague of mine stated that somehow this code works on his computer.

POSTED BY: L P
Posted 1 year ago

Hello! I hate to say this, but for some reason your code works for me, so I'm not sure whether it's because you're using a different version of Mathematica? One thing I did note was that the 'NoteBookDirectory[]' function didn't work for me, so I changed it so that it was set to the actual path of your main file. You could otherwise (I believe) just save to the same directory. If you're not getting an actual error though, that's pretty odd. It might just be worth restarting your PC/Mathematica.

To summate quicker, maybe put in the direct file path to your main file into the directory function, and try that. It seems to suggest something wrong parsing the actual package. Hopefully this helps though :)

POSTED BY: Theo Vine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard