Say I have four meshgrids with values that are offset by a constant value along, x, y and both x and y:
x1 = 1:1:10;
y1 = 1:1:10;
[X1,Y1] = meshgrid(x1,y1);
offset = 0.5;
x2 = x1 + offset;
y2 = y1;
[X2,Y2] = meshgrid(x2,y2);
x3 = x1;
y3 = y1 + offset;
[X3,Y3] = meshgrid(x3,y3);
x4 = x1 + offset;
y4 = y1 + offset;
[X4,Y4] = meshgrid(x4,y4);
Corresponding to these four different grids are discrete data-sets that represent say velocity, for example:
v1 = rand(10,10);
v2 = rand(10,10);
v3 = rand(10,10);
v4 = rand(10,10);
How can you combine and sort the four velocity matrces into a single matrix based on a combination of the four x,y grids? I believe in the elementary example I listed above, the results would be a velocity matrix that is 20x20. The velocity values would correspond to position:
x = 1:offset:10;
y = 1:offset:10;
[X,Y] = meshgrid(x,y);
0 Comments
Sign in to comment.