How to get the accurate coordinate value of the point on a fitted contour? And how to integrate along the contour?
Afficher commentaires plus anciens
Hello!
I am in trouble with processing data with matlab.
The mesh is two dimensional and each grid point has its function value f.
In matlab, the iso-surface of f=0 can be fitted with the command 'contour';
Then the question is,
1) Given an x coordinate value, how to get the accurate y coordinate value of the point on the fitted contour?
2) In order to get the accurate length of the total contour, how to integrate along the contour?
dx=dy=0.001m
For a random x coordinate value, for example x=0.00875, how to get the corresponding y coordinate value on the contour f=0?
And how to get the accurate length of the total red contour line?
==============================================================================
Data=load('shuju.dat');
x=Data(:,1);
y=Data(:,2);
f=Data(:,5);
xx=reshape(x,301,43);
yy=reshape(y,301,43);
ff=reshape(f,301,43);
v=[0,0];
contour(xx,yy,ff,v,'r','LineWidth',2);
xlabel('x/m');
ylabel('y/m');
========================================================================
Thanks!

Réponse acceptée
Plus de réponses (2)
Ren Zetian
le 28 Nov 2014
0 votes
Ren Zetian
le 8 Déc 2014
0 votes
Catégories
En savoir plus sur Contour Plots dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!