Skip to main content
1-Visitor
July 24, 2010
Question

IsScalar

  • July 24, 2010
  • 2 replies
  • 14443 views

...

bar_anim.gif

jmG

2 replies

1-Visitor
July 25, 2010

Jean,

Scalars - You have enlightened me with your explanation.

I have only once found a valid application for the IsScalar function, see attached image. This was a function Stuart produced called 'Setcount'. Might be worth supplying a few examples of using the function so other collabs can follow.

Mike

1-Visitor
July 25, 2010

Jean, Scalars - You have enlightened me with your explanation

________________________

Here attached, the supplementary example of the range to vector converter from Stuart. "IsScalar" is usually paired with "matchNaN" and "markNaN". .. "FilterNaN". You may want to detect/decide about the outliers in a data set, mark them "markNan", then apply If IsScalar (matchNaN) and get rid of the outliers . This application is detailed in the DAEP [Data Analysis Extension Pack]. If you don't have that Pack, I could eventually reproduce it .

Have you zoomed down your image ?

Can't read, can't zoom + ...

Zoom is an irreversible destructive process.

It should not even exist. Only applicable if

the original is in hand, otherwise ... zap !

Jean

1-Visitor
July 25, 2010

Here is the function.

19-Tanzanite
July 26, 2010

A range variable is not a scalar. A scalar is a single number. A range variable contains three pieces of information: start, increment, and end. If you use a range variable as a function argument, it does not pass the range variable to the function. It evaluates the function for each value defined by the range variable, so what is passed to the function is a sequence of scalars (so still not a scalar, but a sequence of scalars!). This is true for any function, including IsScalar. So what you get is a series of 1s as the result. If you pass a range value to IsScalar what you get as a result is 0.

IsScalar of range.gif

1-Visitor
July 26, 2010

Richard,

We are saying the same thing except that you are wrong !

>A range variable is not a scalar < [Richard]

In Mathcad, the range variable, i.e: the argument is a scalar [Jean]

That's all what it accounts for: disambiguation between the book definition and the Mathcad logical test vis the applicable numerical algorithms. I'm glad we have these two, side by side. So many, too many This is not a scalar ... There must be an array in there have been corrected in the former Mathcad collab. It might be a good idea to collect more of This is not a scalar.

Thanks for reading and collaboration.

Jean

19-Tanzanite
July 26, 2010

jean Giraud wrote:


That's all what it accounts for: disambiguation between the book definition

What book defintion? There is no book definition of a range variable. Sorry, but I have no idea what you are trying to say.

This is not a scalar ... There must be an array in there

What have arrays got to do with it? A range variable is not an array either.