How to make a 3D plots for car tuning with specific axis

5 visualizzazioni (ultimi 30 giorni)
Hi! I am working on tuning my car and I want to be able to transfer 3D plots and their subsequent data into Matlab. I am working with a 17x17 table of air fuel ratio data plotted against RPM and Pressure Ratio (Known as the Performance Enrichment or PE table). The data of the table I am trying to replicate in Matlab is in the attached pictures as PE and PE3d. What I want to do is to be able to rescale both axis (RPM and PR) of the PE graph to match the axis of a different 17x17 table (Volumetric Efficiency, see VE) with different axis. The end result I desire is that both tables will contain the same set of axis values so that I can element wise multiply the Volumetric Efficiency graph by the Performance enrichment graph. I know there may be some resolution error when changing the PE axis to match the VE axis but that is okay. Please let me know what tools and commands I can use to 1. import the PE table and make a graph of it, and 2. Scale the PE axis to what I want. Any help would be appreciated. Thanks, Adam

Risposte (1)

Ed Marquez
Ed Marquez il 18 Mag 2017
Hi Adam,
I am assuming you are using R2017a, but if you are using a release within the past 3 years the interface will be very similar.
- For Data Import
You can import your data into MATLAB in many ways. See the link below for details:
One way is from the HOME Tab >> Import Data >> Select the appropriate file. Many file formats are supported, but you can find the additional details here:
Another way to do this is by clicking the New Variable button and copying and pasting the data in the variable matrix. Then you can rename this variable to something that aligns with your data.
- For Graphing the Data
The surface plot will be adequate. You can find details for it in the link below:
Note that the surface plot can take a matrix as input argument (air fuel ration matrix data), and it can also take x and y vectors (let's say RPM and Pressure Ratio) with a data matrix (say air fuel ratio). I think the fastest way to get started with the plotting is to use the PLOTS tab. This is a more interactive way to generate plots thank using the plotting commands, but it is very important to understand how the plotting functions actually work. You can generate graphs from the PLOTS Tab by selecting existing variables from the Workspace and then clicking one of the available plots.
For instance, if in the Workspace you have a vector variable called RPM and another vector called PressureRatio and a matrix called AirFuelR, then you can select them (in that order) and then click one of the available plots (Surface).
2. To Re-Scale the PE Axis
For this part you may need to be familiar with creating and modifying vectors and matrices in MATLAB. I have included two useful links below that have info on the colon notation and the linspace function:
Good luck and have fun!


Scopri di più su 2-D and 3-D Plots in Help Center e File Exchange


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by