Hi ZigzS,
You can tranform the data set by rotation it around the Z axis by the required degree of dip. Post this, you can plot the rotated data for further analysis. Here is an example script:
% Sample dataset
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];
y = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
z = [1.1, 2.3, 3.0, 4.1, 5.2, 6.1, 7.3, 8.0, 9.2, 10.1];
data = [x', y', z'];
% Plotting original data for reference
figure;
subplot(1, 2, 1);
plot3(x, y, z, 'o');
xlabel('X');
ylabel('Y');
zlabel('Z');
title('Original 3D Data');
grid on;
axis equal;
% Dip direction in degrees
dip_direction_deg = 331;
% Convert dip direction to radians
theta = deg2rad(dip_direction_deg);
% Rotation matrix for rotation around the Z-axis
R = [cos(theta), -sin(theta), 0;
sin(theta), cos(theta), 0;
0, 0, 1];
% Rotate the data
rotated_data = (R * data')';
% Extract the new x-coordinates and z-coordinates
new_x = rotated_data(:, 1);
z = rotated_data(:, 3);
% Plotting rotated data
subplot(1, 2, 2);
plot(new_x, z, 'o');
xlabel('Dip Direction');
ylabel('Z');
title('2D Profile Aligned with Dip Direction');
grid on;
axis equal;
We utilise the deg2grad function to convert the dip direction from degrees to radians. The link to its documentation is as follows:

