05-16-2011 02:05 AM
Hi !
I need to project a sinus grating while being able to parameter the steps and the phase.
So this is what I'm at, I'm still learning to use Labview and the idea here is to calculate the value at a given column and copy it to the entire column. What do you think about it ?
Thanks in advance for your answers 🙂
05-16-2011 06:02 AM - edited 05-16-2011 06:06 AM
A few comments without spending too much time trying to understand what you're trying to achieve...
1) Beware local variables! Instead of witing 768 to the Hauter local, and then wiring the Hauter local into the Initialize array, just wire 768 into initialize array. As you have it, you will get unpredictable results... will 768 be written to the local before it is read, or will it be read befor 768 is written....? The same goes for Largeur: There is no need for the local variable here.
2) You appear not to have an output of the code. Presumably you are trying to use the array that is manipulated in the inner for loop? Don't forget to wire it up to something.
3) Beware wiring up the iteration terminal on the for loop ("N") as well as using autoindexing. Notice the little square brackets where the array enters the outer for loop. Have a look at the help file about for loops and autoindexing to make sure you understand whats going on.
4) As far as I can tell you're trying to create an array where all of the columns are identical. What is the value of this? Why not just have a single column?
Just a few thoughts for you to be going on with - I hope they help you. Once you've looked at some of these issues, revisit your code and see if its doing what you expected... if not, post back.
Ian