Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mathematica Tag Times is Protected

  1. Mar 4, 2016 #1
    Hey, I'm unsure why the following returns an error:

    1e12560bae48b507c072815f32cb9bbf.png

    Any ideas on how to fix this?
     
  2. jcsd
  3. Mar 4, 2016 #2

    DrClaude

    User Avatar

    Staff: Mentor

    It means that you already defined K. Entering K = . will remove the previous definition of K, so you can define it again as a function.
     
  4. Mar 4, 2016 #3
    Ah thank you!
     
  5. Mar 4, 2016 #4

    Mark44

    Staff: Mentor

    Not the most helpful error message...
     
  6. Mar 4, 2016 #5

    DrClaude

    User Avatar

    Staff: Mentor

    That's because the error occurs after the substitution has been done. If you look carefully,
    you will see the presence of [q_, N_] after a bunch of math. That bunch of math is what K was equal to: K[q_, N_] was substituted by <<value of K>>[q_, N_], including some mathematical operations that cannot appear on the left side of := .

    It doesn't take long to get acquainted with "Tag [...] is Protected" in Mathematica, and one never forgets what they are due to :smile:
     
  7. Mar 4, 2016 #6

    Mark44

    Staff: Mentor

    I get "Tag" but "Tag Times in ... " is inscrutable. Is "Times" the name of a variable in the OP's script?
     
  8. Mar 4, 2016 #7

    DrClaude

    User Avatar

    Staff: Mentor

    No, it's multiplication (in the core Mathematica language).
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Tag Times is Protected
  1. LaTeX Equation Tag (Replies: 2)

  2. Time Sync MATLAB (Replies: 1)

Loading...