Re: 3d contour and surface plots from z,y and z data



As an alternative to using gridfit, you might want to take a look at Curve
Fitting Toolbox 2.0 which ships with the 9a release of MATLAB.
The toolbox has a new surface fitting Graphical User Interface which is
great for these types of problems.

Coincidentially, on Tuesday May 12th, I'm going to be delivering a webinar
titled Tip and Tricks: Data Analysis and Surface Fitting with MATLAB.
One of the main examples that we'll be working with is modeling Brake
Specific Fuel Consumption as a function of Engine Speed and Load.

We'll also be talking about the new surface fit objects that store the
results of this type of fitting operation.

Lets assume that I have three 200 x 1 vectors named BSFC, SPEED, and LOAD

I can create a fit object named Surface using the following command

Surface = fit( [SPEED, LOAD], BSFC, 'LOWESS', 'Span', .2 );

Once I create this fit object, I can operate it using a standard set of
methods.

For example, I can create a plot of the fit object as follows

plot(Surface)

Alternatively, I can create a residual vector as such

Residuals = BSFC - Surface(SPEED, LOAD);










"ilya holt" <ilya30@xxxxxxxxx> wrote in message
news:gqbi5e$9op$1@xxxxxxxxxxxxxxxxxxxxx
"John D'Errico" <woodchips@xxxxxxxxxxxxxxxx> wrote in message
<gqb4vh$a0i$1@xxxxxxxxxxxxxxxxxx>...
"ilya holt" <ilya30@xxxxxxxxx> wrote in message
<gqb3q1$ham$1@xxxxxxxxxxxxxxxxxx>...
i have some data collected from an ic engine, namely engine speed, bmep
and bsfc. i am required to create a contour plot of engine speed vs
bmep along the x and y axis respectively, and bsfc as height along the
z axis. im having great trouble getting the data into the correct
format, and then plotting it. from reading help files i understand i
need to make z into a matrix.. ? ive tried everything i could find but
haven't yet got anywhere with it.

i'm very new to matlab, can anyone tell me the steps i need to take to
do this?

Use gridfit. Find it on the file exchange.

http://www.mathworks.com/matlabcentral/fileexchange/8998

It will turn your scattered data into data on a
regular lattice of points. Then you can do
either a surf or a contour with no problems.

HTH,
John

Hi John, thanks for the reply.

can you tell me how to install this into matlab? i can't find instructions
anywhere as to how to make it work in the program


.



Relevant Pages

  • Re: Fitting function involving an integral
    ... I have a problem in fitting data with a ... where fs are the fitting parameters, ... and Matlab needs a scalar to ... I get for the fitting parameters are completely meaningless. ...
    (comp.soft-sys.matlab)
  • Re: Fitting function involving an integral
    ... where fs are the fitting parameters, ... and Matlab needs a scalar to ... The problem is that when I try to perform the fit, ... some reason is not able at all to recognize even the center ...
    (comp.soft-sys.matlab)
  • Re: Fitting in Matlab
    ... The student version comes without the Curve Fitting Toolbox. ... Matlab is really wonderful for manipulating data (recorded in physical ...
    (comp.soft-sys.matlab)
  • help in single exponential fitting
    ... I am kind new in using Matlab. ... I used 'fit', however the fitting result is not good. ... Can anybody recommend a fitting function or method that is good in ...
    (comp.soft-sys.matlab)
  • Re: linear regression in 3D data points
    ... Why not to solve the fitting in two of the three possible pair of ... > I've imagined using a linear regression of matlab but without success ...
    (sci.image.processing)

Loading