Jump to content

Recommended reading for fundamental data behaviour?


AlexA

Recommended Posts

Hey guys

I'm not savvy with how to make my code appear in my post but I've attached the vi at the bottom. Please note it was saved from Labview 2009, I'm not sure how to save it as an earlier version so if you guys can't see it please let me know along with a quick explanation how to save it as an earlier version.

I'm attempting to iterate through each row of the array which represents my picture (basically checking each line of the picture), and perform an autocorrelation. I'm then summing the results of the autocorrelations and finally averaging the resulting array. It's not behaving as I expect.

My questions:

1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register?

2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element?

3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky?

Finally, I've performed a search of the forums for words surrounding this topic obviously, but if I've missed anything obvious or if there is a good external link please let me know.

Cheers

Alex

ImgAnlysAutoCorrelateBasic.vi

Link to comment

Hey guys

I'm not savvy with how to make my code appear in my post but I've attached the vi at the bottom.

Install the Code Capture Tool. You can either install the OGP file with VIPM or run the 'Install Code Capture Tool' VI inside the (extracted) zip file.

Please note it was saved from Labview 2009, I'm not sure how to save it as an earlier version so if you guys can't see it please let me know along with a quick explanation how to save it as an earlier version.

File->Save for previous version.

I'm attempting to iterate through each row of the array which represents my picture (basically checking each line of the picture), and perform an autocorrelation. I'm then summing the results of the autocorrelations and finally averaging the resulting array. It's not behaving as I expect.

You don't average, and only plot the last result of the autocorrelation:

post-2399-125987787284_thumb.png

1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register?

2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element?

3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky?

Well the easiest is me to tell you. However the best is when you write some little tests to see what happens.

You can make it yourself easy by enabling 'execution hightlighting' (the light-bulb on the block diagram)

Good luck,

Ton

Link to comment

My questions:

1. When passing an array into a shift register, does it pass it like a "single element", i.e. is the whole array stored in the shift register?

2. When summing two arrays using the plus operator, I expect it to sum each element of the first array with the corresponding element of the second array, is that the case? Or do I have to iterate through the arrays "manually" to sum each element?

3. When performing a divide operation on an array how does Labview behave? Does it divide each element or do something else wacky?

Hi Alex

These are some pretty fundamental things that I suggest, rather than searching in this case, you create the code stubs and just run and test them. That can be an equally fast way to find things out.

Here is a start for you:

post-10325-125987857672_thumb.png

<edit>

Ton beat me to the post :)

</edit>

Link to comment

Hey Ton

I think I might have put an old version of my VI in by accident, silly me. Anyway, here's the picture I took of my most recent attempt. (I got the code capture tool, took a snap shot, but I'm still not sure how to insert it directly into my post, my forum-fu sucks).

post-16778-12598787898_thumb.png

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.