LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

[Newbie] Generating a 2D array from two 1D arrays

Wow!! I though you had this done from a previous .vi but it seems like you've made that whole .vi to suite my question! Im basically reverse engineering every .vi that seems somewhat related to help me get this program started.. I started learning labview myself only since friday haha, the hardest part is the basics. Im really glad you guys are so helpful, ill make sure to come here for any questions, ill try to implement what you just showed me by tomorrow, you'll likely be hearing from me again as this is only 1/4 of my total program i need to create.
---
Where awareness goes, energy flows.
0 Kudos
Message 11 of 18
(1,449 Views)

@VedranJ wrote:
Wow!! I though you had this done from a previous .vi but it seems like you've made that whole .vi to suite my question!

Once you learn a few things in LV, it is surprisingly quick to create seemingly complex VIs.  I am not so bold to as to claim to be the fastest G programmer around here, just the fastest named Darin (or alternate spellings).  Smiley Tongue

 

 

0 Kudos
Message 12 of 18
(1,439 Views)

Darin.K wrote:

... just the fastest named Darin (or alternate spellings).  Smiley Tongue


Very bold words! 😄 (especially considering the blue alternate spelling 🐵

(You should come to NI-Week and enter the speed coding challenge to back up your claim.)

 

 

VedranJ:

Typically, you don't need to generate these large intermediary data structures such as the 2D array, especially if you can calculate the desired row "on the fly" with little effort. Once you are dealing with massive data structures, being wasteful here can make you run out of memory in no time.

 

 

Message 13 of 18
(1,429 Views)

altenbach wrote:
Very bold words! 😄 (especially considering the blue alternate spelling 🐵

(You should come to NI-Week and enter the speed coding challenge to back up your claim.)


 


Texas in August?  Oh, yes please.  Maybe if I still needed an iPad.  Smiley Very Happy  I've heard from a few contestants that Darren has lost a step and will be going down hard.

 

Spoiler
Perhaps I made that up. 

 

0 Kudos
Message 14 of 18
(1,412 Views)

I am having trouble with a broken wire in part of my code. I'll just show you rather than explain it, it looks like its an input going to an input and I'm not sure why this is happening or how to fix it.

 

Also I included my attempt at making a slider-plot. You'll notice I did some weird stuff with the "time" which is simply the x-axis of my plot. I strung together the 3 x-axis values so that they would match the length of my array rows. The idea completely failed when I realized that I'm not offsetting the x-axis values so the x-axis is a complete mess that doesn't actually go up in any particular timestep over the entire range. (eg. 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5) instead of (0 1 2 3 4 5 6 7 8 9 10 11..)

 

and altenbach, thanks for the .vi, I would have spent hours trying to find that Property: Scale:Maximum without just copying it over from your vi... my trouble with your .vi is I don't understand how to change it for my input waveforms, I have 64bit doubles with about 800 points on average that I would like to overlap using this .vi and I am rather unclear how the start of your .vi puts the array together

 

labviewarrays.png

---
Where awareness goes, energy flows.
0 Kudos
Message 15 of 18
(1,400 Views)

What's wring with the suggested solutions? They work!

 

You probably have a broken wire because you deleted the stop button control.

 

Your "poor attempt" looks quite silly. Why don't you attach actual code instead of pictures?

0 Kudos
Message 16 of 18
(1,397 Views)

Your "poor attempt" looks quite silly. Why don't you attach actual code instead of pictures?

--yes I know, and I suppose attaching the vi is much easier than making png files in paint

 

 

What's wring with the suggested solutions? They work!

--I'm sure they both do

 

 

You probably have a broken wire because you deleted the stop button control.

 --My picture looks identical to the one posted except the wire isnt broken

---
Where awareness goes, energy flows.
0 Kudos
Message 17 of 18
(1,393 Views)

This is my outline for what I want to get done in the next week or so. 

 

Basically the idea is to take this overlapped waveform as determined by the slider and apply a FFT to it. Using an LRC cct with values defined by the user a filter function (bandpass) is applied to the FFT to make it a filtered FFT. Then use IFFT to get the filtered waveform back. From there apply the nonlinear equation where c1 c2 and V0 are user defined parameters. After offsetting the overlapped filtered waveform (after IFFT) we take the time intergral of each row of the array to produce a 2x(2N+1) array that we can easily plot using a 2D graph... this is my program I need to create 🙂

 

Spoiler
photo.JPG

 

---
Where awareness goes, energy flows.
0 Kudos
Message 18 of 18
(1,374 Views)