Hello,
I want to plot the participants' information ( Number of people, Ages , BMI ) of my experiment into a professional 3D plot using MATLAB.
The data showing as below: ( the data is saved in CSV file names "Participants" ):
Please anyone can help me how to do that?

 채택된 답변

Tala
Tala 2022년 3월 29일

0 개 추천

T= readmatrix('Participants.csv');
x=T(:,1);
y=T(:,2);
z=T(:,3);
scatter3(x,y,z)

댓글 수: 10

Mubarak Alanazi
Mubarak Alanazi 2022년 3월 30일
I am confused what is the proper way to plot these information? any suggestion
Tala
Tala 2022년 3월 30일
just copy and paste the code. it will work just fine
Mubarak Alanazi
Mubarak Alanazi 2022년 3월 30일
I mean do you have any other idea that to present this data in better way.
Tala
Tala 2022년 3월 30일
if your data is share-able, please do so, I will take a look
Mubarak Alanazi
Mubarak Alanazi 2022년 3월 30일
I am recording data for my experiment and I want to present the participants information in my journal in better way. your suggestions is highly apprecaited.
The data attached.
I would show the corrolations between variables.
T1= readtable('Participants_1.xlsx');
T1.Gender = categorical(T1.Gender);
T1.Gender = double(T1.Gender);
T2=table2array(T1);
imagesc(corrcoef(T2)); colorbar
xticks([1 2 3 4 5])
xticklabels({'Age','Gender','Height','Weight','BMI'})
yticks([1 2 3 4 5])
yticklabels({'Age','Gender','Height','Weight','BMI'})
Mubarak Alanazi
Mubarak Alanazi 2022년 3월 30일
I think we dont need to plot the height and weight since BMI there.
Tala
Tala 2022년 3월 30일
편집: Tala 2022년 3월 30일
I am not an expert in your field. If you feel you need to drop the values, you can easily do so.
T1= readtable('Participants_1.xlsx'); T1 = removevars(T1, {'Height_cm_','Weight_kg_'});
T1.Gender = categorical(T1.Gender);
T1.Gender = double(T1.Gender);
T2=table2array(T1);
%%
imagesc(corrcoef(T2)); colorbar
xticks([1 2 3])
xticklabels({'Age','Gender','BMI'})
yticks([1 2 3])
yticklabels({'Age','Gender','BMI'})
Mubarak Alanazi
Mubarak Alanazi 2022년 3월 30일
thanks
Tala
Tala 2022년 3월 30일
편집: Tala 2022년 3월 30일
anytime :)

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

추가 답변 (0개)

카테고리

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

질문:

2022년 3월 29일

편집:

2022년 3월 30일

Community Treasure Hunt

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

Start Hunting!

Translated by