Skip to main content
added 703 characters in body
Source Link
chuy
  • 11.4k
  • 29
  • 49

This is likely a consequence of taking the toy example too seriously, but LinearModelFit seems like a good choice:

lmf=LinearModelFit[data,{x,y},{x,y}] ContourPlot[lmf[x,y],{x,0,100},{y,0,100},Contours->{80,120},ContourShading->None] 

enter image description here

For a the data provided you might get some use from:

basis[n_,m_] := Flatten[Table[x^i y^j,{i,0,n},{j,0,m}],1] lmf = LinearModelFit[data,basis[4,6],{x,y}]; 

Now use this linear model:

cp = ContourPlot[lmf[x, y], {x, 0, 0.5}, {y, -4, 4}, Contours -> {2.30, 6.18}, ContourShading -> None, ContourStyle -> Red] Show[ListContourPlot[data, Contours -> {2.30, 6.18}, ContourShading -> None], cp] 

enter image description here

Not too bad, of course you can adjust the basis used as appropriate. At some point, if you have the information to create a nonlinear model that will be better of course.

This is likely a consequence of taking the toy example too seriously, but LinearModelFit seems like a good choice:

lmf=LinearModelFit[data,{x,y},{x,y}] ContourPlot[lmf[x,y],{x,0,100},{y,0,100},Contours->{80,120},ContourShading->None] 

enter image description here

This is likely a consequence of taking the toy example too seriously, but LinearModelFit seems like a good choice:

lmf=LinearModelFit[data,{x,y},{x,y}] ContourPlot[lmf[x,y],{x,0,100},{y,0,100},Contours->{80,120},ContourShading->None] 

enter image description here

For a the data provided you might get some use from:

basis[n_,m_] := Flatten[Table[x^i y^j,{i,0,n},{j,0,m}],1] lmf = LinearModelFit[data,basis[4,6],{x,y}]; 

Now use this linear model:

cp = ContourPlot[lmf[x, y], {x, 0, 0.5}, {y, -4, 4}, Contours -> {2.30, 6.18}, ContourShading -> None, ContourStyle -> Red] Show[ListContourPlot[data, Contours -> {2.30, 6.18}, ContourShading -> None], cp] 

enter image description here

Not too bad, of course you can adjust the basis used as appropriate. At some point, if you have the information to create a nonlinear model that will be better of course.

Source Link
chuy
  • 11.4k
  • 29
  • 49

This is likely a consequence of taking the toy example too seriously, but LinearModelFit seems like a good choice:

lmf=LinearModelFit[data,{x,y},{x,y}] ContourPlot[lmf[x,y],{x,0,100},{y,0,100},Contours->{80,120},ContourShading->None] 

enter image description here