How sampling 3d scattered points

조회 수: 11 (최근 30일)
Lorenzo Bennati
Lorenzo Bennati 2020년 12월 3일
댓글: Ameer Hamza 2020년 12월 3일
Hi everyone,
I have a 3D matrix that represents the coordinates of 108 points in the 3d Cartesian space. So, for every row, i have the coordinates of a point. These points represent the centerline of a leaflet of the mitral valve.
My goal is to sample this points in order to pass from 108 points to 32 points keeping the same shape of the centerline of the leaflet of the mitral valve of the 108 points.
How can i do this?
Thanks in advance for the help.
I have attached also a figure that represents the position of the points.
Lorenzo

답변 (1개)

Ameer Hamza
Ameer Hamza 2020년 12월 3일
One option is to use interp1()
X = rand(108, 3);
t = linspace(0,1,size(X,1));
t_new = linspace(0,1,32);
X_new = interp1(t, X, t_new);
  댓글 수: 4
Lorenzo Bennati
Lorenzo Bennati 2020년 12월 3일
Thank you very much for the help
Ameer Hamza
Ameer Hamza 2020년 12월 3일
I am glad to be of help!!!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by