Surface Plot with 3 vectors
133 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
To plot 3 vectors A,B & C, I have used surf plot. I have noticed there is a syntax error in my code below. When I select the columns from the variables and used the plots on the Menu bar...the surface plot popped up but the axis limits are not matching with my data? I appreciate your suggestions.
A=data(1:78,1); B=data(1:78,2); C=data(1:78,3); surf(A,B,C)
0 commentaires
Réponse acceptée
KSSV
le 21 Fév 2018
data = importdata('data.txt') ;
x = data(:,1) ; y = data(:,2) ; z = data(:,3) ;
dt = delaunayTriangulation(x,y) ;
tri = dt.ConnectivityList ;
xi = dt.Points(:,1) ;
yi = dt.Points(:,2) ;
F = scatteredInterpolant(x,y,z);
zi = F(xi,yi) ;
trisurf(tri,xi,yi,zi)
view(2)
shading interp
4 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Surface and Mesh Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!