Community Tip - Need to share some code when posting a question or reply? Make sure to use the "Insert code sample" menu option. Learn more! X
I am trying to write a sheet for grad, div, and curl.
I am finding that one symbol (rho) is considered as a constant instead of a variable.
what should I do to rectify this?
Solved! Go to Solution.
Prime has an annoying habit of labeling your variables and constants. You (apparently) have rho as a constant:
Prime has an annoying habit of labeling your variables and constants. You (apparently) have rho as a constant:
Yes...I think prime has this weird behaviour. I changed rho with other symbol and changed it back to rho...and it showed a correct result.
The thing is I dont always have the opportunity to debug this kind of error..although I have sort of an expected result beforehand.
Do you have any tips for me?
As Luc says, the way Prime labels is a mystery to us all. Prime does format the variable differently from label type to label type, although there are very minute differences.
The original Mathcad didn't really use labels a lot. So if you defined a variable m := 24 gm (call the mass the letter m, and assign it the value of 24 grams), Then a little further on defined length := 6 m (define the length to be six meters), what you really told Mathcad was "define the variable "length" and assign it the value of 144 grams." (6 x 24 = 144)
So when they redid Prime, they used labels; you can have m (as a variable or constant) equal to 24 grams, AND m (labeled as a unit) to represent one meter.
The result: They solved one issue and created another.
Tips? About this? When you see something that doesn't seem to make sense, stop and figure it out. It's usually time well spent.
Tip:
Make sure that you have well distinguished looks of the same 'name' when it is labelled differently. E.g. Have your 'variables' be italic, your 'units' be upright and maybe in a different colour, etc. That will show more easily when two items are different(ly labelled).
Success!
Luc
Why would rho be (labelled as) a constant? Prime doesn't 'know' the constant rho.
When I open the sheet in Prime 4:
- rho as the argument to the differentiation is labelled as a variable.
- rho as the differentiatioon variable (rho after 'd') is labelled as an 'automatic'.
Apparently that suffices to see them as different beasts, hence the differential results in 0 instead of 1.
Anyway, the issue occurs as a result of Prime's automatic labelling.
Success!
Luc