Skip to main content
1-Visitor
March 2, 2012
Question

Global Definition operator questions

  • March 2, 2012
  • 31 replies
  • 8262 views

Hi,

I'm specifying the behavior of the global definition operator for Mathcad Prime 3.0, and have a few questions. First of all, how do you use the global definition operator in Mathcad 15? We know people like to set it up next to a plot or other results, to see what happens when you change its value. How else is the global definition useful.

We'd like to clean up some of the current behavior. In Mathcad 15, you can have this situation:

This behavior seems very confusing, especially if the values and definitions are spread throughout a worksheet.

We are defining the global definition for Prime 3.0, so that a variable can only be defined globally once in a worksheet. If a variable is defined globally, you will get an error if you try to redefine it locally. Likewise if you globally define x ~3 and x~4, you will get errors on both definitions, until you remove one of them.

Let me know if this change will cause problems for any converted worksheets.

Thanks,

Mona

31 replies

mzeftel1-VisitorAuthor
1-Visitor
March 2, 2012

My image of Mathcad 15 behavior didn't upload. Here it is

global-definition-15.png

23-Emerald I
March 2, 2012

For completeness, version 14 does the same thing.

This illustrates why Dixie cautions her students against globals, and why I caution my coworkers too. And why the sheets in the Roark workbook are so exasperating--there are globals all over those!

Globals are useful whenn you have an eight (or twelve, or ..) long sheet with your final result graph on the last page and you need to play "what if" with a variable that you specified on page 1 and used ten times on every page without making it the argument of functions. Disabling the first instance, and putting a global definition next to the answer graph saves an awful lot of scrolling!

Other than that, I agree with Dixie, there's too much capacity for confusion.

1-Visitor
March 2, 2012

Mona, I very rarely use Global definitions and caution my students not to use them, there are safer ways to do things.

19-Tanzanite
March 2, 2012

you will get errors on both definitions, until you remove one of them.

I assume "remove" would include simply disabling one of them?

mzeftel1-VisitorAuthor
1-Visitor
March 5, 2012

Yes, disabling would remove a region from the calculation order, so would do the same thing as deleting a region.

Mona

24-Ruby IV
March 5, 2012

I use the Global definition operator when I make (debug) an animation:

GlDefAnimation.png

Do we have an animation tolls in future version of Prime?

24-Ruby IV
March 3, 2012

I use a global definition operator if I want to have a constant in my calculatuon.

I use a := operator if I want to have a variable in my calculatuon.

One example:

Nautilus.png

1-Visitor
March 3, 2012

I do not use a global variable. But I do fancy the idea of a split screen or a popup.

I usually create sheets with an input section, math and output. The input section can be pretty large at times, often extra input is needed along the calculation, so to examine the final results while varying the input, a split screen is very handy indeed.

But not just one split, I'd like to have multiple views on the same worksheet as I have some pretty large calculations.

It would be a very efficient tool while developing new calculations, because I then can evaluate multiple intermediate results with one click instead of scrolling through the worksheet. It would help me a lot to keep track of things and to keep focus.

1-Visitor
March 14, 2012

Will the global definition be compatible with Excel components and other scripted objects?

Mike

mzeftel1-VisitorAuthor
1-Visitor
March 14, 2012

Mike,

Do you mean putting an global definition inside an Excel component? Can you provide an example of what you want?

Thanks,

Mona

1-Visitor
March 14, 2012

No Mona, I just remember trying to use global definitions in my early days and having issues passing the globally defined variables to say, an embedded Excel component. If the globally defined variables had the ability to be passed to any feature within the software, I believe that would be a massive improvement.

Hope that makes sense.

Mike

10-Marble
March 26, 2012

I just came across... I use it when I want to write parametric functions. Like y.a,b(x):=a*x+b

I have to use shift+ctrl+k to make the left side so this can be improved and the I have to use either a definition to a and b before the function or which I prefer somewhere else.

19-Tanzanite
March 26, 2012

Can you provide an example in a Mathcad worksheet?

10-Marble
March 26, 2012

Yes, but how do I attach a file in here???? This actually says a lot about this forum!