I am a beginner in matlab and now doing a project in measuring the dose at different coordinates x y z. Now I would like to plot a 3D scatter plot with different color representing the dose level and probably a color wash generated from the plot. I have input the data to an excel spreadsheet with 4 columns x y z dose. Thank you in advance for your help.

 채택된 답변

KSSV
KSSV 2022년 8월 16일

0 개 추천

T = readtable('myfile.xlsx') ;
scatter3(T.(1),T.(2),T.(3),[],T.(4),'filled')

댓글 수: 4

Marco Tam
Marco Tam 2022년 8월 16일
Thank you. Is it possible to further make a 3D volume color wash from the scatter plot? Also, can I merge the plot/ volume color wash with 3D file in obj format?
KSSV
KSSV 2022년 8월 16일
Can be done. for this I suggest to attach your data.
Marco Tam
Marco Tam 2022년 8월 16일
이동: KSSV 2022년 8월 16일
I attached the data xlsx here. Thank you.
T = readtable('https://in.mathworks.com/matlabcentral/answers/uploaded_files/1099290/test%20dose.xlsx') ;
Warning: Column headers from the file were modified to make them valid MATLAB identifiers before creating variable names for the table. The original column headers are saved in the VariableDescriptions property.
Set 'VariableNamingRule' to 'preserve' to use the original column headers as table variable names.
X = T.X ;
Y = T.Y ;
Z = T.Z ;
V = T.Dose_nGy_ ;
dt = delaunayTriangulation(X,Y,Z) ;
patch('faces',dt.ConnectivityList,'vertices',[X Y Z],'facevertexcdata',V,'facecolor','interp','edgecolor','k') ;
view(3)
Also have a look on slice

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

제품

릴리스

R2020a

질문:

2022년 8월 16일

댓글:

2022년 8월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by