Skip to main content
24-Ruby IV
September 4, 2018
Question

Range variable - atavism

  • September 4, 2018
  • 3 replies
  • 10426 views

What is a Range variable?
This is a variable, without which it was impossible to do someone in old-old versions of Mathcad (Mathcad 4 I think but not Prime). There was no programming and technology for QuickPlot in this versions. Now, we have programming and technology of QuickPlon. But we continue to use the range variable according to habit, for convenience. But this sometimes creates some problems (one example here). The range variable is similar to the vector and some Mathcad users try to apply to the range variable tools intended purely for the vector.
My question is this!
Can you show me one Mathcad sheet where we can not do anything without a range variable?

One little example:

RangeVar.pngVector.png

This topic has been closed for replies.

3 replies

25-Diamond I
September 4, 2018

Your vector variant still depends on a range (the for-loop!)

 

Basically a range can and should be used just for three different tasks:

1) index the elements of a matrix or vector

2) define a range for plotting

3) in a program in the definition of a loop

24-Ruby IV
September 5, 2018

>Your vector variant still depends on a range (the for-loop!)

Sorry, it was not a Range Variable but the programming construction For. See please

For-RV.png

>Basically a range can and should be used just for three different tasks...

Sorry, can but not should...

A ask one more!

Show please one Mathcad sheet where we must use a Range variable!

 

25-Diamond I
September 5, 2018

> Sorry, can but not should...

Always use the tool and the method which is most clear, most easy, etc.

And if the best method is a range, you should use it.

Your method to create a vector sure is a way to do the task without ranges, but using a range on worksheet level or using a program with a for loop is simply the better and more clear way to achieve the task.

>

Show please one Mathcad sheet where we must use a Range variable!

Why?? Why should we try to avoid a range?

 

23-Emerald I
September 5, 2018

How about the old (still working in Prime Express) matrix sequential calculator:Capture2.PNG

24-Ruby IV
September 6, 2018

Yes, Fred, we should use range variable in Mathcad versions without programming tools - old Mathcads and Mathcad Express. But now it is not good to have in Mathcad sheet both: range vars and vectors. A range variable is an atavism.

atavism.png

A propos!

Can you use not i:=1..10 but i:=stack(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)?

23-Emerald IV
September 6, 2018

There's a much simpler method to get that vector:

i:=matrix(9,1,max)+1

 

Success!

Luc

24-Ruby IV
September 13, 2018

See please one real problem when we use a Range Variable - not a Vector (one problem with Excel component in Mathcad Prime)

https://community.ptc.com/t5/PTC-Mathcad-Questions/MathCad-results-in-Excel/m-p/571089