Tag Times is Protected

  • #1
17
0
Hey, I'm unsure why the following returns an error:

1e12560bae48b507c072815f32cb9bbf.png


Any ideas on how to fix this?
 

Answers and Replies

  • #2
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.
 
  • #3
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.
Ah thank you!
 
  • #5
Not the most helpful error message...
That's because the error occurs after the substitution has been done. If you look carefully,
1e12560bae48b507c072815f32cb9bbf.png
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:
 
  • #6
I get "Tag" but "Tag Times in ... " is inscrutable. Is "Times" the name of a variable in the OP's script?
 
  • #7
I get "Tag" but "Tag Times in ... " is inscrutable. Is "Times" the name of a variable in the OP's script?
No, it's multiplication (in the core Mathematica language).
 

Suggested for: Tag Times is Protected

Replies
2
Views
765
Replies
1
Views
661
Replies
1
Views
185
Replies
5
Views
5K
Replies
2
Views
661
Replies
4
Views
1K
Replies
2
Views
3K
Replies
1
Views
494
Back
Top