Hi @Rohit,
To address your query regarding, “I have a scattered data (Attached file). By using a scatter command it give me a circular form. I want to join the data point of circle by line. How can we do this? Please give idea.”
Please see my response to your comments below.
Since Pos_UI1 is a matrix with two columns (assuming the first column represents the x-coordinates and the second column represents the y-coordinates), I extracted these coordinates for plotting. Then, used the scatter function to visualize the individual points. Afterwards, plot function to connect the points in the order they are arranged in the matrix. Here is a complete example based on your provided code:
% Load the variables into the workspace data = load('U_Au_T100.mat');
% Display the contents of the loaded data disp(data);
% Extract the position data Pos_UI1 = data.Pos_UI1; % Assuming Pos_UI1 is the variable name
% Extract x and y coordinates x = Pos_UI1(:, 1); % First column for x-coordinates y = Pos_UI1(:, 2); % Second column for y-coordinates
% Create a scatter plot of the data points figure; % Create a new figure window scatter(x, y, 'filled', 'MarkerFaceColor', 'b'); % Scatter plot with blue filled circles hold on; % Hold the current plot
% Connect the data points with lines plot(x, y, 'r-', 'LineWidth', 1.5); % Plot lines connecting the points in red
% Add labels and title xlabel('X Coordinate'); ylabel('Y Coordinate'); title('Scatter Plot with Connected Lines'); grid on; % Add a grid for better visualization hold off; % Release the hold on the current plot
Please see attached.
If you have any further questions or need additional assistance, feel free to ask!