Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

10-24-2001 03:59 PM

Options

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

Area= [Pi((R(n)+R(n+1))/2)^2]/360+[Pi((R(n+1)+R(n+2))/2)^2]/360+...

This is a summation formula where for each iteration, one point, R(n), is added to the succeeding point,R(n+1). Once all 360 points that I have collected from my data acquisition have gone through the equation, I can add up all the iterations to get cross sectional area.

Ok, now I need to figure out how to get LV 4.0 to use this equation. I initially thought I could use the formula node, but that won't work because all of my data is being auto indexed in a while loop, then put in an array.

I was thinking about adding the calculat

ion portion to the while loop, but I figured that would slow things down too much. Unfortunately, I don't know how to get LV to do the n and n+1 for all 360 points.

Please help! Attached in my current program.

10-24-2001 07:35 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report to a Moderator

> circle, on data I have collected.

>

> Area= [Pi((R(n)+R(n+1))/2)^2]/360+[Pi((R(n+1)+R(n+2))/2)^2]/360+...

>

....

> I was thinking about adding the calculation portion to the while loop,

> but I figured that would slow things down too much. Unfortunately, I

> don't know how to get LV to do the n and n+1 for all 360 points.

>

A simple option is to use a shift register. Popup on the

while loop and add a shift register. Either popup on the

left shift register to add a terminal or grow the left

terminal down. At this point, each value that is written

to the right edge will show up on the left, and the

previous will show up below giving you val_n and val_n-1.

There are many ways to finish

this, but initializing the

terminals to something like NaN and testing for two non-

NaN values inside the loop or testing i will prime the

shift registers.

Another option is to turn off auto-indexing and use one

or more index nodes to peel off the n and n+1 items.

I'm not sure what it means to add the calculation portion

to the while loop. If this means using individual plus

and multiply nodes, I wouldn't worry much about the speed.

The formula node and individual icons generate similar

code, especially when the debugging info is turned off in

VI Info.

Greg McKaskle