Jump to content

Comparing the values of the same array


Recommended Posts

Greetings… i salute you… or something like that

I need to do a very specific task in LabVIEW this week… and I kind of have some ideas to do it, but i have to use a lot of imagination to do this... the fact is that i remember a numeric method may be programed with the shift registers in a for or a while looop structure, by making the register grow down... (sounds wierd but i'm sure you understand what i mean)... this works or at lest i've used it before, when we are just generating the values that are getting inside the shift register... but what if i have already an Array with the whole values i need to use, any ideas about how may i compare the values in orther to slice the array when there is a couple of sign changes???

i'll keep trying, and i know is verry basic... but when you are " :frusty: " you may not see the obvious answer...

thanks..

Link to post
Share on other sites

Greetings… i salute you… or something like that

I need to do a very specific task in LabVIEW this week… and I kind of have some ideas to do it, but i have to use a lot of imagination to do this...

Homework?

If you have done some work, please upload it. If not, then at least attempt it before you ask for help.

Edited by Neville D
Link to post
Share on other sites

ok... they gave me permission to ask properly.... I have .xls sheets... (I hope I wrote it right) they were written from a signal they measure a while ago, they do not have the conditions to measure those signals again, but still they want to use the information in that files…

So the conditions of these signals are actually weird, they change a lot in their amplitude and frequencies… but It was told to me that I consider converting a single period of a signal into an amplitude Vs Degrees instead of an Amplitud vs Time graphic, so the first thing I have to do, is to get the values from the .xls file, I did it into a 1D- Array, and now I want to measure how many values make a complete period, this is comparing the value of the array with the previous one, if there is a sign change.. well actually a couple of those, I have to cut the array, see the size of the sub array, divide the number of elements by 360, and append to each value the result of the division times 360, you know, to relate each value of the array with the angular value of the period of the wave it represent… I know… sounds like it could be easier done but…it is not my idea, I’m just following orders…

Anyway… if it is something that people do… ¬¬ well if it is actually useful I thought that may one of you have done it before…

Thanks a lot anyway, and have an ice day…

Link to post
Share on other sites

Well. I've got no idea what you are talking about. biggrin.gif

However. A LV picture speaks a thousand words so a quick glance at your code and it looks like you are just wanting to detect sign changes between 2 arrays of doubles?

If this is correct then I would do something like this:

Edited by ShaunR
Link to post
Share on other sites

Join the conversation

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

Guest
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.