Skip to main content
8-Gravel
May 26, 2025 10:07 AM UTC
Solved

Variable Setting

DDHH2001_0-1748253040334.png

I tried to output the calculation result. The ideal result would be like: "ps = k tp + b "according to the "IF processing". The "tp" here actually relates to the time, but right now I just want the result to be like the form I mentioned above. In other word, I think and hope the "tp" is just a symbol in my ideal output result.

So I tried to set it as a  "key word" or "constant" by setting the labels but found nothing helpful. Can any solution help me with this? Many thanks advanced !

Files attached.

Werner_E
Werner_EAnswer
25-Diamond I
May 26, 2025 12:43 PM UTC

If you expect a symbolic result (as tp is an undefined variable) you have to use symbolic evaluation and not numeric (the normal equal sign).

Werner_E_0-1748263057220.png

Is it this you are looking for?  No need the re-label tp as Keyword or anything else.

Number of decimals is per default 20, You can limit this number using the "float" keyword. But keep in mind that doing so also affect the precision of the calculation, not just the display of the result.

 

Symbolic evaluation:

Werner_E_1-1748263261630.png

 

 

12 replies

24-Ruby III
May 26, 2025 10:33 AM UTC

MartinHanak_0-1748255582980.png

 

Translate
DDHH20018-GravelAuthor
8-Gravel
May 26, 2025 11:38 AM UTC

Hi !

I mean, this is where the  problem occurs. I try to set the "tp" as  symbol, but it keeps telling me that the "tp" is undefined and to recheck the lable that I set.

I change the definition btw, two variables are needed in this function I defined actually.

DDHH2001_0-1748259285828.png

 

Translate
DDHH20018-GravelAuthor
8-Gravel
May 26, 2025 12:08 PM UTC

I do a little modification. Instead of outputting the ideal equation form that I need, I try to calculate the coefficients "k" and "b". But there is a new problem occurs indicated that "This value must be a function".😥

Translate
Werner_E
Werner_E25-Diamond IAnswer
25-Diamond I
May 26, 2025 12:43 PM UTC

If you expect a symbolic result (as tp is an undefined variable) you have to use symbolic evaluation and not numeric (the normal equal sign).

Werner_E_0-1748263057220.png

Is it this you are looking for?  No need the re-label tp as Keyword or anything else.

Number of decimals is per default 20, You can limit this number using the "float" keyword. But keep in mind that doing so also affect the precision of the calculation, not just the display of the result.

 

Symbolic evaluation:

Werner_E_1-1748263261630.png

 

 

Translate
DDHH20018-GravelAuthor
8-Gravel
May 26, 2025 1:49 PM UTC

THANKS! It does work! 

Translate