Draw following graph with given data

조회 수: 11 (최근 30일)
Tumbee
Tumbee 2022년 4월 7일
답변: vidyesh 2023년 9월 26일
Given Condition
Scattered data • Centroid on xy-plane • Line from the centroid to another cluster • with real aspect ratio on [0, 1] 3 • Distances between the centroid to each data in another cluster

답변 (1개)

vidyesh
vidyesh 2023년 9월 26일
Hi Tumbee,
I understand that you want to plot your data in the manner shown in the image.
To achieve this, you can utilize the following MATLAB functions.
  1. Scatter3 – This function will assist you in visualizing the data. You can find more details about it here- https://mathworks.com/help/matlab/ref/scatter3.html
  2. Mean – By employing this function, you can calculate the centroid of your data. For further information, please refer to the documentation available here - https://mathworks.com/help/matlab/ref/mean.html
  3. Norm – This function enables you to determine the distance between two points. You can access additional information about it here - https://mathworks.com/help/matlab/ref/norm.html
I hope these suggestions prove helpful to you in drawing the desired graph.

카테고리

Help CenterFile Exchange에서 Scatter Plots에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by