chart function of two variables

hemsleysut

Board Regular
Joined
Jul 29, 2002
Messages
124
I'll like to graph a function of two variables eg. f(x,y)=2x^2-y^2-y. I suspect I will need the surface chart but can some one tell me how to generate the chart and what to enter on the worksheet. Thanking you in advance.
 

Some videos you may like

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

ThePencilQueen

Board Regular
Joined
Jun 26, 2002
Messages
109
ok this is a little bit complicated but doable (well I just did it for your example and it looks very pretty).

First you need to list some regularly spaced (ie 1,2,3 or 5,10,15 or 100,200,300) x values along row 1 (starting in cell b1).
Then list some y values (again regularly spaced...preferably the same values as you used for x) down column A (starting in cell A2).
Next write your formula in cell B2...for your example I used:
=(2*(B$1^2))-($A2^2)-$A2
The dollar signs mean that the formula will always use the value in row 1 or column a.
Autofill the formula (hover the mouse over the bottom right hand corner of B2 until you see a + sign, click and drag) along the whole of row 2, untill you get to the end of your x values, then autofill down until you reach the end of your y values.

Once this is done simply select the cells containing the formula and do a surface chart.

The surface chart uses the cell position to determine the data points x,y co-ordinates and the value in the cell is plotted along the z axis.

I hope this makes some sense.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,207
Messages
5,594,841
Members
413,944
Latest member
3xc3ln00b

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top