Particle Trajectories Over Specified Domain

2 views (last 30 days)
  2 Comments
Image Analyst
Image Analyst on 1 Dec 2019
Edited: Image Analyst on 1 Dec 2019
Is the domain over x, y (or both), or over t?
If x and y, then what value does t have?
If over t, then what are the values of x and y?
Image Analyst
Image Analyst on 1 Dec 2019
But why haven't you answered the question "If x and y, then what value does t have?"

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 1 Dec 2019
Try this:
numPointsX = 640;
numPointsY = 480;
X = linspace(0, 2, numPointsX);
Y = linspace(0, 2, numPointsY);
[x, y] = meshgrid(X, Y);
t = 1;
z = sin(pi*x) .* sin(pi*y) + 0.3*sin(2*pi*t) .* y;
imshow(z, []);
colormap(hsv(256));
colorbar;
axis('on', 'image');
title('z = sin(pi*x) .* sin(pi*y) + 0.3*sin(2*pi*t) .* y', 'FontSize', 20);
  2 Comments
Adam Fleetwood
Adam Fleetwood on 5 Dec 2020
Edited: Adam Fleetwood on 5 Dec 2020
I am trying to use this for a project I am working on, but am interested in following the streamlines starting in either the left or right domain. Is it possible to do this and have the lines beginning in the left be red and the right be blue?
Image Analyst
Image Analyst on 5 Dec 2020
Why don't you either call contour(), or just threshold the image at some level and call bwboundaries()?

Sign in to comment.

Categories

Find more on 2-D and 3-D 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!