Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get this to plot in XY graph?

Status
Not open for further replies.

ldc6

Electrical
Jan 14, 2004
3
Hi guys - I'm sure this is a basic question, but I can't seem to get past it.

I have the following:

Function(i):= ( data1(i) data2(i) data3(i) )

Function(0)= ( 5 2 3)

Freq:= 8..10

I want to be able to plot Function(0) vs. Freq on an XY Plot (similar to below pic but w/ connected lines), but I can't seem to get it to work. Any ideas?

5| x
4|
3| x
2| x
1|_ _ _ _
0 8 9 10

Any help would be greatly appreciated.

Thanks in advance :)
 
Replies continue below

Recommended for you

Greg- Thanks for your help. I tried what you said and it gives me an error saying that Function(Freq-8) is not a scalar so it doesn't plot anything.

Any more ideas?


Thanks,ldc
 
You seem to have made it overly complicated, but since you've not given enough details...

The simplest thing to do is to put the values in two 3x1 vectors, one called Y and the other called X, and plot Y against X.

You can do something similar if you use a data table or an Excel component.

TTFN
 
IRstuff - Thanks. I did what you suggested and it worked for one value of the index i (i.e. Function(0) vs Freq). Is there anyway to plot Function(i) vs. Freq on an XY plot for all values of i?

Thanks again,
ldc

 
How many do you have?

As I mentioned, data tables or Excel components can be used for inputing data from tests or experiments. The Excel component can easily be used to directly import test data into two columns. Assign two output variables, for Columns A and B. Use a 2x1 matrix with elements X and Y:

(X Y):= your excel component.

The do the plot as before.

TTFN
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor