Timeline for Why does Mathematica return `$Failed` with this function definition?
Current License: CC BY-SA 4.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 11, 2022 at 5:39 | comment | added | hana | I see. I should make it a habit. | |
Nov 11, 2022 at 5:15 | comment | added | CA Trevillian |
@hana this is a good illustration of why it is good practice to ClearAll your function names before you define them. In this case, you would write something like ClearAll[capacitor]; in the line before your definition of capacitor .
|
|
Nov 10, 2022 at 23:37 | comment | added | hana | I tried Remove[capacitor] and then excute the function definition again and it works! | |
Nov 10, 2022 at 23:11 | comment | added | hana | The definition alone returns failed. | |
Nov 10, 2022 at 23:09 | comment | added | Victor K. |
What specific code produces $Failed ? Just the definition above, or an attempt to use it? Can you post the code you are trying to run if it's the latter?
|
|
Nov 10, 2022 at 23:07 | comment | added | hana | I was thinking it's my problem but afraid to restart Mathematica as I'll have to restart many programs. | |
Nov 10, 2022 at 23:05 | history | answered | Victor K. | CC BY-SA 4.0 |