"Square" function in formula node
Author Message "Square" function in formula node

The square(x) function in the formula node does not seem to work, can
someone confirm, or give me some example syntax?

LabVIEW 6.1, Win2K

Sat, 15 Jan 2005 21:34:41 GMT  "Square" function in formula node
If you want calculate x^2 write y=power(2,x)
If you want square root write y=sqrt(x)

Sat, 15 Jan 2005 22:00:30 GMT  "Square" function in formula node

the square function is not available in the base package. it's
functionality is

square(x) Square Function square (x) returns: 1 if 2n  <= x <= (2n +
1)
0 if 2n + 1 <= x <= (2n + 2)

where x is any real number and n is any integer.

If you have a look at the help for formula nodes, and then look at the
functions from there, it includes square(x), but this doesn't work in
a formula node!

You need to use the square function.vi sub vi under -
Analyze->Mathematics->Numeric Functions

Anyone at NI comment? - Mis print in the help??
Win98 LV 6.1 PDS

S.

Sat, 15 Jan 2005 22:22:39 GMT  "Square" function in formula node
Hi,

x^2 is written as x**2. But x*x also works ;)

Regards,

Wiebe.

Quote:
> The square(x) function in the formula node does not seem to work, can
> someone confirm, or give me some example syntax?

> labview 6.1, Win2K

Sat, 15 Jan 2005 23:02:58 GMT  "Square" function in formula node
Hi Mache,
so if you go to the LV Help on Formula Nodes, and then go to the
"creating formula nodes" link, and then go to the "functions" link it
says
square(x) is valid for a formula node -
<b>mis-print???????????</b>

S.

Sat, 15 Jan 2005 23:18:38 GMT  "Square" function in formula node
In Labview Help on How to...

Under Index Tab
type "Formula Node"
Under Formula Node look for "Parser Differences"
Thats where the table is... on what and how you can use Formula Node.

Th Problem as you mentioned is if you go to "Create..." link It gives
you all the Functions that can be used by Formula and Expression
Nodes. What is Missing is an extra column detailing the functions
which are excetions for each case. All these caveats and tricks are
listed under Mathematics VI's and none under Formula Node. Definitely
something which can be easily corrected

To NI's Credit they give an email address so that you can comment on
documentation.

Regards,

Mache

Sat, 15 Jan 2005 23:48:59 GMT  "Square" function in formula node
Hi Mache,
the mist clears......

One for the documentation guys as you said.
so the ones that won't work are
gamma, ci, si, spike, step, square

Thanks
S.

Sun, 16 Jan 2005 00:02:16 GMT  "Square" function in formula node
Actually x*x is even preferable to x**2 for two reasons:

1) It's faster.  x**2 computes the log(x) using a polynomial series,
multiplies the log by 2 and then exponentiates this value using
another polynomial series.

2) It's more accurate:  Polynomial series have errors depending on the
number of terms that are used that are much higher than what you get
by a single multiply.

Of course with math coprocessors or built in MPU's in today's CPU's a
lot of this is implemented in hardware on the chip so speed is a lot
less of a factor than it used to be in the good old days but the
relative accuracy of x*x vs. x**2 should still be true.

Doug De Clue
LabVIEW programmer

Quote:

> Hi,

> x^2 is written as x**2. But x*x also works ;)

> Regards,

> Wiebe.

> > The square(x) function in the formula node does not seem to work, can
> > someone confirm, or give me some example syntax?

> > LabVIEW 6.1, Win2K

Fri, 21 Jan 2005 03:36:21 GMT

 Page 1 of 1 [ 8 post ]

Relevant Pages