Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function definition not working in tutorial namespace #127

Open
light-matters opened this issue Sep 27, 2024 · 0 comments
Open

Function definition not working in tutorial namespace #127

light-matters opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@light-matters
Copy link
Contributor

Discovered in the fact that ListPlot3D doesn't display properly in cavity_physics.clj tutorial.

Not sure how long this has existed for (it definitely did display at some point in the past).

Inspection shows that the 'f' in

(defn Efield
  "For convenience, we build a clojure function over the Wolfram expression created earlier."
  [t1 t2 l1 l2 phi]
  (wl/eval (w/Clear 'f))
  (wl/eval (w/_= (list 'f
                       (w/Pattern t1 (w/Blank))
                       (w/Pattern t2 (w/Blank))
                       (w/Pattern l1 (w/Blank))
                       (w/Pattern l2 (w/Blank))
                       (w/Pattern phi (w/Blank)))
                 I4--approx))
  (wl/eval (list 'f t1 t2 l1 l2 phi)))

is never evaluated as a function and simply remains as a symbol in the plot numbers. The code above itself looks strange and should probably be rewritten.

@light-matters light-matters added bug Something isn't working documentation Improvements or additions to documentation labels Sep 27, 2024
@light-matters light-matters changed the title Function definition not working Function definition not working in tutorial namespace Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

1 participant