LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Broken Array Wire Doesn't Make Sense

Solved!
Go to solution

I am trying to create a two dimensional array by decimating a 1-D array and then using the build array function to create the two-dimensional array from it. Does anyone have any idea why this isn't working? I feel like this should be working. I did something similar to this (i didnt do the mulitply by a scalar step) and it worked fine. Help please.

 

 

---------------------------------
[will work for kudos]
0 Kudos
Message 1 of 12
(4,081 Views)
Right click the Build Array primitive and uncheck the concatenate option.

___________________
Try to take over the world!
Message 2 of 12
(4,077 Views)

Wow, you are the man. Thanks. I feel stupid.

  

---------------------------------
[will work for kudos]
0 Kudos
Message 3 of 12
(4,075 Views)

Of course you realize that there has to be a better way to do all this. 🙂 Too much duplicate and excessive code!

 

Try it, it should fit on a postage stamp. 🙂

 

Can you attach your VI?  What is the size of the BLUE array input? 

Message Edited by altenbach on 09-04-2008 01:29 PM
Message 4 of 12
(4,046 Views)

altenbach wrote:

Of course you realize that there has to be a better way to do all this. 🙂 Too much duplicate and excessive code!

 

Try it, it should fit on a postage stamp. 🙂


That, of course, depends on the size of the stamp. Smiley Very Happy According to Wikipedia, the largest stamps used were 52x95 millimeters. Smiley Surprised

Message Edited by smercurio_fc on 09-04-2008 04:37 PM
Message 5 of 12
(4,013 Views)
Solution
Accepted by topic author rex1030

There are many ways to do this, so here's one possibility. Would that fit on a stamp? (I guess it depends on the dot pitch of your monitor.)

 

 

 

(note that we only need to fit the "algorithm", not the terminals:D)

Message Edited by altenbach on 09-04-2008 02:45 PM
Message 6 of 12
(4,008 Views)
My code fits on a postage stamp. Its a subVI, ha ha ha. Yea, I just inherited this project from a coworker who is no longer here. I thought it was a little inefficient, but I am just trying to get the whole thing working again before I start trying to make it more efficient. I'll fix this up though. thanks guys
---------------------------------
[will work for kudos]
0 Kudos
Message 7 of 12
(3,907 Views)

Of course if you are rewriting this thing, you might want to reconsider how you arrage your data. Most likely, you don't want to transpose unless there is a good reason.

Transposing does not change the information, but adds CPU cycles. 🙂

 

I only added the transpose to mimic the exact functionality of the original code.

Message 8 of 12
(3,899 Views)
So, when it comes to how fast the code runs, you think the code I had probably runs faster?
---------------------------------
[will work for kudos]
0 Kudos
Message 9 of 12
(3,877 Views)

rex1030 wrote:
So, when it comes to how fast the code runs, you think the code I had probably runs faster?

 

No!!!

 

(If you are worried about performance, the only way to be sure would be to code up both and benchmark with typical data sizes.)

 

My solution is much more scaleable. Imagine you would need to rewrite it for 128 channels. You would not even be able to find a screen big enough, while in my code all you need to do is change a diagram constant. 🙂

Message 10 of 12
(3,860 Views)