TransWikia.com

Cannot open Utilities 'FilterOptions'

Mathematica Asked on August 31, 2021

I’m trying to run a code like this in Mathematica:

(* initialize everything *)
ClearAll["Global`*"]
Remove["Global`*"]

(* all *nb are in $WorkingDirectory *)
$WorkingDirectory = "/Users/U1/Workspace/BCOASMBH/Core/Fortran/"
(* Load Assumptions and format.m *)
Get[FileNameJoin[{$WorkingDirectory, "TemplateForHamiltonian.nb"}]];

However, I keep getting the error:

Get: Cannot open Utilities`FilterOptions`.
Needs: Context Utilities`FilterOptions` was not created when Needs was evaluated.
==========================
Example Script For Writing
==========================
filename = "testing.f" 
stmp = OpenWrite[filename, FormatType -> OutputForm];
Write[stmp, FortranAssign[VariableInFortran, FormulaInMathematica, 
AssignPrecision -> 16, AssignTemporary -> {t, Array}]];
Close[stmp];

I have tried to write:

Begin["Private`"];
FilterOptions[s_, r___] := Sequence @@ FilterRules[Flatten[{r}], Options[s]];

Which some posts on Stack have suggested but nothing seems to work. I use Windows and have Mathematica v.12.

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP