Wavetip detection (contour related issue)
3 views (last 30 days)
Show older comments
I have a spiral shaped propagating wave. The spiral likes to walk around a bit. I'd like to quantify this. The wave front is very sharp and the contours are close together. The wave back is flatter and the contours are more spread apart. I'd like to find where these two collide (the wave tip). Contour plot is working nicely (see fantastic High Definition picture remastered in Paint). What I'd like to do is use whatever contour plot uses to calculate the contour lines so I can find when the lowest two contour lines (at values 0.1 and 0.2) are a certain distance from each other. Is there a way to use contour plot and instead of plotting the contours, obtain the data used to plot it so I can do some of my own analysis on the lines?
Thanks to anyone that can provide any assistance!
0 Comments
Answers (1)
Star Strider
on 27 May 2014
If you used MATLAB to plot the contour plot in the image you posted, you can use the same data to plot a surface (the surfc or meshc plots would likely be most approptiate). Look at the plotted surface and see if that suggests an approach.
You might also consider the gradient function to determine the amplitude of changes in the surface, inflection points, and other areas-of-interest.
2 Comments
Star Strider
on 27 May 2014
My pleasure!
I don’t know what your data are, but if you have the coordinates of the values that define the red line (maximum value, zero gradient, or however you define it), follow progressively increasing increasing incremental angles between the adjacent x and y coordinates as the curve radius becomes less. One possibility might be diff(atan2(diff(y),diff(x))) or perhaps even abs() of it. Where that value is maximum is likely close to the end of the red line.
This assumes that you can isolate the coordinates of the red line with enough precision to make that option realistic. If your data are noisy, that might not be applicable.
This is an example of the strategy I can’t adequately describe otherwise:
crvx = t.*cos(t);
crvy = t.*sin(t);
dvx = -diff([0 crvx]);
dvy = -diff([0 crvy]);
figure(1)
plot(crvx, crvy, '-b')
hold on
quiver(crvx,crvy, dvx,dvy, 'r')
% plot(dvx, dvy, '-r')
hold off
grid
I defined the curve as starting from the center and diverging, so the reason for the negative values for ‘dvx’ and ‘dvy’. Make appropriate changes for your data.
See Also
Categories
Find more on Contour Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!