Results 1 to 2 of 2

Math Help - Help with surface plotting experimental data (Matlab)

  1. #1
    Newbie
    Joined
    Aug 2009
    Posts
    2

    Help with surface plotting experimental data (Matlab)

    Hi
    I hope this is the correct section for this specific problem, and if it isn't I hope any moderator will be kind enough to move it to the proper one.

    I need help with representing my results in a graphical manner. After a test run with an internal combution engine I have a matrix of values which I want to visualize with a surface plot. On the X-axis I want the [rpm] of the engine, on the Y-axis I want the engine load (How much strain is put on the engine crank shaft in Newtonmeters). The height of the Z-component will then symbolize the temperature in the engine.

    What I have got from my measurements is a matrix with 3 columns and several hundred rows.

    It is managed in the following manner.
    [RPM, Torque load, Temperature]

    [ 2000, 400, 250
    1000, 400, 270
    2000, 300, 230
    1000, 300, 280...]

    As you can see, the rpm is stepped down from the highest value to the lowest one. (In my matrix there are around 25 steps from 2000 to 1000.)

    While stepping down the RPM, the torque load has been held at a constant value which in turn generate a measured temperature. This procedure repeats itself and forms, as mentioned above, several hundred rows.

    How do I plot this in a three-dimensional manner with the commands surf or mesh? Do I have to manually insert the temperature after having created a meshgrid with the meshgrid command?

    [RPM,Torque] = meshgrid(1000:2000,200:400) ? This will as you might figure, require vast amounts of time and I'm certain there are other more simple ways to create a surface out of my values.

    How can I get the measured temperatures to position themselves in the correct rpm/torque position in my 3d-plot?

    Any means of assistance is greatly appreciated!

    Thanks
    - Cali
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Newbie
    Joined
    Aug 2009
    Posts
    2
    I believe I have solved the problem with the "griddata"-command.

    Below follows an example of the code.

    clc,clf
    A = load(
    'rpmNmmpTtemp.asc');

    B = A(:,1);
    C = A(:,2);
    D = A(:,5);

    %% Array
    rpm = 500:10:2400;
    torque = 0:10:2500;

    [xi,yi] = meshgrid(rpm,torque);

    [zi] = griddata(B,C,D,xi,yi);

    %% Plotting
    mesh(zi)
    axis([0 max(rpm) 0 max(torque)])
    xlabel(
    'Engine RPM'), ylabel('Engine torque')


    I know this is not a dedicated matlab forum but I figured I'd try anyway.

    Thanks.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. MATHEMATICA FindFit experimental data
    Posted in the Math Software Forum
    Replies: 6
    Last Post: February 13th 2010, 03:50 PM
  2. 3D surface from data points in matlab
    Posted in the Math Software Forum
    Replies: 3
    Last Post: December 25th 2009, 08:43 AM
  3. Matlab, find area under experimental plot
    Posted in the Math Software Forum
    Replies: 9
    Last Post: October 29th 2009, 06:09 AM
  4. stats - Experimental Data and Design Analysis
    Posted in the Advanced Statistics Forum
    Replies: 1
    Last Post: August 13th 2006, 01:55 PM
  5. Saxon algebra 2 (experimental data)
    Posted in the Advanced Algebra Forum
    Replies: 4
    Last Post: January 26th 2006, 11:39 AM

Search Tags


/mathhelpforum @mathhelpforum