09-04-2008 01:56 PM
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.
Solved! Go to Solution.
09-04-2008 01:59 PM
09-04-2008 02:02 PM
Wow, you are the man. Thanks. I feel stupid.
09-04-2008 03:23 PM - edited 09-04-2008 03:29 PM
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?
09-04-2008 04:37 PM - edited 09-04-2008 04:37 PM
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. According to Wikipedia, the largest stamps used were 52x95 millimeters.
09-04-2008 04:45 PM - edited 09-04-2008 04:45 PM
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)
09-09-2008 10:35 AM
09-09-2008 10:52 AM
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.
09-09-2008 12:02 PM
09-09-2008 01:11 PM
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. 🙂