cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Redefine or erase predefined unit

mlavery
4-Participant

Redefine or erase predefined unit

I am using MathCad 15 and am working on some simple calculations to get used to the MathCad environment and syntax since I am pretty new to using MathCad.

Unfortunately I ran into a seemingly small problem to which I can't find a satisfying solution:

I defined a function f(t) which I wanted to plot in a 2D-XY-diagramm.  Since t is predefined as ton (t=10^3 kg) I get an error trying to plot my function f(t) over t.

Is there any way I can redefine or erase t so I can use it as a variable to plot my diagramm? I know I could use any other variable, but it just bothered me that I cannot use t for time.

Thank you very much in advance!

6 REPLIES 6
VladimirN
24-Ruby II
(To:mlavery)

Please attach your Mathcad worksheet.

LucMeekes
23-Emerald III
(To:mlavery)

Simply define t, e.g. as:

t:=0,0.1...15

to have it run from 0 to 15 with steps of 0.1.

Below the your definition Mathcad will not know tonne defined as t. You may get a green underline below your definition of t, to signify that you've redefined a previous definition (you've overriden tonne defined as t).

Luc

Just do something like:  i:=0; 100  and ti := tend*i/100  (where you will have predefined tend, of course).  (And ti is t subscript i,  t[i )

Alan

-MFra-
21-Topaz II
(To:mlavery)

Hi Melanie Lavery,

...you must remember that....

Tonnef and tonf.jpg

Greetings

F. M.

What you describe is a very annoying effect which is present only in localized versions of Mathcad. I also experienced the same problem in my German version and its one of the reasons I only use Mathcad with language set to English (this cures the problem).

You may experience similar effect when using s (seconds) and its also annoying when dealing with Laplace transformation (which uses s and t).

So my advice is to switch the language to English to be on the safe side.

But the effect you experience only shows up when using Mathcads quickplot feature - that is using an undefined variable at the abscissa.

So if you define a range variable for t before you plot, all would be OK

Another trick you may like and I use from time to time is to add a dot after the variable name. That means you would use t. at the abscissa and of course something like f(t.) at the ordinate. This is a different variable than t, so no problems with "tonne" and it will look like a normal t.

I also use this trick when I already have assigned a variable a value but want to see the same variable name in the (quick)plot. Unfortunately Mathcad15 does not provide a way to undefine/clear variables.

mlavery
4-Participant
(To:Werner_E)

Thank you very much for your answer. This has been the most helpful! I switched MathCad to English and now this problem is no longer present.

Top Tags