Considering :
ALLdwafDif[#] & /@ symmetries
Save["ALLL.m", ALLL]
Is there a way to save the results in a particular directory ? It开发者_开发问答 automatically save the results in my user directory now.
The current working directory is given by Directory[]
. You can set it by SetDirectory[]
. Alternatively, you can append the directory name to ALLL.m
and it works.
eg
f = 5;
Save["~/Desktop/temp.m", f]
does what you'd expect (~
is a shortcut for home directory on most Unices, and mma respects it, so this gets saved on my desktop)
If you want to change the default working directory permanently you can add something like SetDirectory["new_dir"];
to one of the files $BaseDirectory/Kernel/init.m
or $UserBaseDirectory/Kernel/init.m
(which one depends on whether you want to change the default directory for all users or for the current user only). Next time you restart Mathematica, Directory[]
will then automatically be set to new_dir
.
Save[SystemDialogInput["FileSave", "All.m"], ALLL]
brings up a standard system save-file dialog box and saves your file after you've chosen a location (and a new file name if you have chosen one).
I find it useful to save data in the same location as the notebook:
f = 5;
Save[FileNameJoin[{NotebookDirectory[], "f.dat"}], f]
Or to save in your (default) Dropbox directory:
Save[FileNameJoin[{$HomeDirectory, "Dropbox", "f.dat"}], f]
I rarely use the directory stack that's controlled by SetDirectory[]
and friends.
精彩评论