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?

 Akzeptierte Antwort

Tala
Tala am 29 Mär. 2022

0 Stimmen

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

10 Kommentare

Mubarak Alanazi
Mubarak Alanazi am 30 Mär. 2022
I am confused what is the proper way to plot these information? any suggestion
Tala
Tala am 30 Mär. 2022
just copy and paste the code. it will work just fine
Mubarak Alanazi
Mubarak Alanazi am 30 Mär. 2022
I mean do you have any other idea that to present this data in better way.
Tala
Tala am 30 Mär. 2022
if your data is share-able, please do so, I will take a look
Mubarak Alanazi
Mubarak Alanazi am 30 Mär. 2022
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 am 30 Mär. 2022
I think we dont need to plot the height and weight since BMI there.
Tala
Tala am 30 Mär. 2022
Bearbeitet: Tala am 30 Mär. 2022
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 am 30 Mär. 2022
thanks
Tala
Tala am 30 Mär. 2022
Bearbeitet: Tala am 30 Mär. 2022
anytime :)

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Gefragt:

am 29 Mär. 2022

Bearbeitet:

am 30 Mär. 2022

Community Treasure Hunt

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

Start Hunting!

Translated by