amazinggaq.blogg.se

3d plot matlab
3d plot matlab






3d plot matlab 3d plot matlab

This has the advantage of directly plotting your data without requiring interpolation to a grid. Use trisurf (or trimesh if you prefer) to plot the data using the triangulation

3d plot matlab

Generate a triangulation of your data points using delaunay It also gives the appearance of having uniform data whether this is true or not. Since you have some raw data values which presumably do not line up with your grid this adds the additional errors associated with the interpolation. Plotting the surface corresponding to the interpolated data on the grid. What you're doing right now is actually two separate things: You may be better served with a slightly different method of surface plotting, especially if you're having memory issues.

3d plot matlab

Is it better to use ndgrid or meshgrid to create the grid? Then I create the scattered data interpolant: F = TriScatteredInterp(x,v,p,'natural') Īnd now I evaluate the interpolant on the grid: ZI = F(XI,YI) The idea is to have a quite smooth surface, because then I have to fit this surface created from measurement data using a mathematical model.įirst I create the grid: (since my measurements vectors have more than 400000 samples, do I have to use more than 1000 for x_plot and y_plot to have a good plot? I have also a problem when I increase too much the length of x_plot and y_plot, infact I get an "out of memory" error message) x_plot = linspace(min(x),max(x),1000) The goal is to plot a surface where $x$ and $v$ represent a point in the plane and $p$ is the "height" above that plane. I have 3 vectors obtained from measurement data: $x$ (displacement), $v$ (velocity) and $p$ (force). I tried to plot a surface in MATLAB but, since it is the first time I had to do something like this, I need a confirmation on the process I followed because it is important for my project to plot the right surface.








3d plot matlab