07-21-2010 01:37 PM
Ok some clarification. At every location on this grid we measure a fullset of of magnitude, phase and frequency points. I'm thinking of applying a nested for-loop and I think it should do the job I'm just having a hard time of arranging it properly on a spreadsheet.
07-21-2010 02:56 PM - edited 07-21-2010 02:56 PM
You're having a hard time because you'd be dealing with 3 3D arrays:
I have to be honest in saying I have no idea what you're trying to do anymore. One time you say you're taking a full sweep, then you say you're measuring one point, and now you're back to saying you're taking a full set of magnitude, phase, and frequency points.
07-21-2010 03:00 PM
I was just having a hard time understanding how everything was going to work. Now i know that I want to take a full set of measurements of magnitude, phase and frequency at every location on the grid.
07-22-2010 03:45 PM
In that case, you will want to write your sweeping code so that it collects the data over every frequency that you want to test (possibly using a for loop) that has your acquisition code. It would be best to take those arrays and bundle them into a cluster. Then you will do that 10000 times going through points (0,0) to (100,100). This will create a 2D array of clusters that contain 3 different arrays of your magnitude frequency and phase.
07-22-2010 04:00 PM
Do you think this will work:
07-22-2010 04:17 PM
Depends. What do you want the output file to look like?
07-22-2010 04:31 PM
I attached how i want my excel file to look like
07-22-2010 04:32 PM
Well, it seems you decided to put what you want the output file to look like in another post. It's best to help when everything is in one place. That will not generate the output file as you showed in the other thread. Appending to an existing file appends vertically, not horizontally. What you'd need to do is to pre-allocate the 2D array and then replace the sections in the 2D array as you collect the data. Or, you can read the contents, play with some array functions, and append the new data. Kind of depends on how much data you're collecting. How many points are you collecting per sweep?
An alternative is to use the Write to Measurement File, though I don't know if you can use that format.
07-22-2010 04:34 PM
I'm collecting 200 points per sweep
07-22-2010 04:55 PM
Hold on, are you sure that's the format you want? For a grid of 100 and 200 points per sweep that would mean a table of 200 rows and 30,000 columns. Planning to import this into Excel (your .xls extension seems to imply this)? If so, you won't be able to. Excel 2007 has a limit of 16,384 columns. Not sure about Excel 2010.