03-25-2011 11:43 AM
Using Measurement Studio .NET 2010, I have an array of 512 values that I want to map to a specific range of display points or X values. For example, my display range is 40 MHz and number of points is 512; therefore, I need to post data every 78,125 Hz. How can I accomplish this?
Solved! Go to Solution.
03-28-2011 01:59 PM
Hi daviddel,
One option would be to use a For loop to assign a point every 78,125 HZ. Here is some psuedo code:
myarray[512]
For i= 0 > 512
PlotXY (78125*i,myarray[i])
I hope this helps!
03-28-2011 04:50 PM
Thank you for your reply. What class library is PlotXY associated with? Currently, I'm using WaveformPlot.PlotY(dataArray), where dataArray contains my 512 data values.
03-28-2011 05:11 PM
Hi daviddel,
Sorry about my earlier post. I overlooked the fact that you were using a waveform graph. What you would want to do is use the PlotY function as you mentioned. Since PlotY has 7 different overloads it can take different paramaters. One of the overloads has the following prototype: PlotY(yData() As Double, start As Double, increment As Double) For your case,the paramaters should be PlotY(dataArray,0, 78,125).
03-29-2011 06:03 PM
Thank you for your help, the solution worked very well.