MATLAB Answers

Particle Trajectories Over Specified Domain

8 views (last 30 days)
Natalie Brown
Natalie Brown on 1 Dec 2019
Edited: Natalie Brown on 4 Dec 2019

  2 Comments

Image Analyst
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);

  0 Comments

Sign in to comment.

Sign in to answer this question.