surfPlot(data,varar​gin)

Version 1.2.0.0 (1,02 ko) par Ambroise
Use surf function easily from a data matrix
116 téléchargements
Mise à jour 14 juil. 2015

Afficher la licence

The surf function requires a certain variable format. here is a function that allows you to plot data from a n*3 matrix using the surf function.
to be used for example with a data matrix of the form [time, position, temperature] or [position in x, position in y, concentration]
Help of the function:
surf plot from [x, y, z] data
data is in the form data = [x, y, z]; where x, y, and z are column vectors
This code works for an input dataset were x and y are like the following :
x only contains n values
y only contains m values
x contains m times all the different n values => length(x)=m*n
y contains n times all the different m values => length(y)=n*m
z contains the corresponding z value for each of those (x;y) points
=> length(z) = m*n
Example : (notice that x is either 1,2 or 3, y is 1,2,3 or 4)
data= [1 1 4.5;...
1 2 5 ;...
1 3 6;...
1 4 7;...
2 1 4.6;...
2 2 5.3;...
2 3 6.4;...
2 4 7.1;...
3 1 5;...
3 2 6;...
3 3 7;...
3 4 8];

Citation pour cette source

Ambroise (2026). surfPlot(data,varargin) (https://fr.mathworks.com/matlabcentral/fileexchange/51097-surfplot-data-varargin), MATLAB Central File Exchange. Extrait(e) le .

Compatibilité avec les versions de MATLAB
Créé avec R2011b
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et MATLAB Answers
Remerciements

A inspiré : sub images

Version Publié le Notes de version
1.2.0.0

h=surfPlot(data) returns now a handle to a chart surface graphics object.
Optional options for surf now supported

1.1.0.0

more efficient code, shorter, thanks to Stephen

1.0.0.0