Hey jim,
You could try plotting the data using the quiver3 method. This method lets you plot vectors with a head and a tail, letting you better analyse them. A simple example with some sample data is as follows:
% Number of vectors
numVectors = 10;
% Generate random positions (xPosition, yPosition, zPosition)
xPosition = rand(numVectors, 1) * 10;
yPosition = rand(numVectors, 1) * 10;
zPosition = rand(numVectors, 1) * 10;
% Generate random vector components (xData, yData, zData)
xData = randn(numVectors, 1);
yData = randn(numVectors, 1);
zData = randn(numVectors, 1);
% Plot using quiver3
figure;
quiver3(xPosition, yPosition, zPosition, xData, yData, zData, 'AutoScale', 'on');
xlabel('X');
ylabel('Y');
zlabel('Z');
title('3D Vector Field');
grid on;
axis equal;
You can refer to the documentation for quiver3 as follows: