Plotting 3D scattered data using CSV
显示 更早的评论
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?

采纳的回答
T= readmatrix('Participants.csv');
x=T(:,1);
y=T(:,2);
z=T(:,3);
scatter3(x,y,z)
10 个评论
I am confused what is the proper way to plot these information? any suggestion
just copy and paste the code. it will work just fine
I mean do you have any other idea that to present this data in better way.
if your data is share-able, please do so, I will take a look
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'})

I think we dont need to plot the height and weight since BMI there.
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'})
anytime :)
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Scatter Plots 的更多信息
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
- América Latina (Español)
- Canada (English)
- United States (English)
欧洲
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
