Message Boards Message Boards

Need help with Manipulate and Interpolate function

Posted 8 years ago

I have data like this.

enter image description here

Here Power is dependent variable and delta, h and g are independent variables.

I want to Interpolate power in the range 0 to 1

I want to plot an interactive plot where x-axis is delta, y-axis is Power and if we change h and g the plot will change according to interactive function. Please say how to do this.

Attachments:
POSTED BY: Soumya Boral
4 Replies
Posted 8 years ago

Thanks a lot.

POSTED BY: Soumya Boral
Posted 8 years ago

@ Hans Dolhaine, Thanks a lot for posting the code. This is exactly what I was looking for. Can you please tell me how to add a title to this plot and how to add axis title. For example : x-axis title should be like 'Delta', y-axis should be like 'Power' and plot title like 'Power vs. delta curve'.

Kindly tell about this. And thanks again for the above code.

POSTED BY: Soumya Boral
Manipulate[
 Plot[power /. x -> xx /. y -> yy /. z -> zz, {xx, 0, 1}, 
  PlotRange -> {0, 1.2}, AxesLabel -> {"Delta", "Power"}, 
  PlotLabel -> "Power vs. Delta"], {yy, 0, 50}, {zz, 20, 40}]

Have a look in the help menu for TextStyle and so on. You can spend hours constructing a "nice" plot......

POSTED BY: Hans Dolhaine

Is it this what you are looking for?

pts = {{{0, 4, 23}, .092}, {{.2, 6, 26.2}, .262}, {{.4, 23, 28.9}, .506}, {{.6, 25.6, 32.5}, .692}, {{.8, 28.9, 
     39.8}, .886}, {{1, 50, 40}, .942}};

power = InterpolatingPolynomial[pts, {x, y, z}]

Manipulate[
 Plot[power /. x -> xx /. y -> yy /. z -> zz, {xx, 0, 1}, 
  PlotRange -> {0, 1.2}], {yy, 0, 50}, {zz, 20, 40}]
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract