Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Can somebody tell me what is wrong with this definition?
See attached Prime8 sheet
Solved! Go to Solution.
There is no symbolic simplification necessary!
Simply define your function with the derivatives and evaluate it numerically.
You should never have to resort to copy and paste results of a symbolic evaluation to a function definition.
If you really want to see a symbolic result you always can evaluate the defined function symbolically.
But you have to keep in mind that the symbolic unfortunately does not know anything about units, especially temperature units which actually are functions! This seems the reason why copying the symbolic result to a function definition threw that error. The symbolics treated °C just like an unknown variable (which cancelled when using a symbolic evaluation as ttokoro had suggested) instead of the function it actually is, The numeric which knows about units chokes on an expression like °C^2.
I won't suggest using the symbolics when you are just after a numeric result.
Alternatively you may calculate the symbolic derivatives, etc. and define and symbolically evaluate your function BEFORE you define any variables. Also use a variable instead of the constant 25° when you do so.
There is no symbolic simplification necessary!
Simply define your function with the derivatives and evaluate it numerically.
You should never have to resort to copy and paste results of a symbolic evaluation to a function definition.
If you really want to see a symbolic result you always can evaluate the defined function symbolically.
But you have to keep in mind that the symbolic unfortunately does not know anything about units, especially temperature units which actually are functions! This seems the reason why copying the symbolic result to a function definition threw that error. The symbolics treated °C just like an unknown variable (which cancelled when using a symbolic evaluation as ttokoro had suggested) instead of the function it actually is, The numeric which knows about units chokes on an expression like °C^2.
I won't suggest using the symbolics when you are just after a numeric result.
Alternatively you may calculate the symbolic derivatives, etc. and define and symbolically evaluate your function BEFORE you define any variables. Also use a variable instead of the constant 25° when you do so.
Thank you, again I have learned something valuable.
I propose an approach as shown in the attached.
Success!
Luc
Thanks Luc, my error was thinking that i cannot use the derivative in a function definition. I thought it can only be used in symbolic calculations. And the error message of MathCad was not really helpful:
"The argument has to be a scalar or a matrix"
Maybe you can also give me a hint how to improve this problem:
I often get very lengthy formulae by setting up an equation, substitute some variables, solve to a variable and so on. To prevent that I need to scroll to the right on lengthy equations, I often copy the result of a symbolic equation to the next line and continue. Is there a possibility to do "line breaks" in symbolic equations optimum would be an operator like ---> -| (symbolic evaluation plus line break, equivalent to +-| "plus with line break").
One solution I derived from your proposal is to define the equation and assign it to a function, then I can repeat the function and all subsequent symbolic operations on a new line. But then I have to repeat all the operations like: (only as an example, even if it makes no sense)
Seems to be better than copying the result, but will not work in all cases.
Thanks Manfred
Control of the output of the symbolics in (real Mathcad and) Prime is hard to impossible. What you want (breaking off at an operator) is not available for symbolic output, but it is supported for definitions.
In your example, just the lowest of the three expressions (The one with two substitutes and a solve) should do.
Unless of course you are massively interested in the symbolic output of each individual step.
If you only require numerical out, then consider using the root function, or a solve block.
Success!
Luc