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?

採用された回答
Tala
2022 年 3 月 29 日
T= readmatrix('Participants.csv');
x=T(:,1);
y=T(:,2);
z=T(:,3);
scatter3(x,y,z)
10 件のコメント
Mubarak Alanazi
2022 年 3 月 30 日
I am confused what is the proper way to plot these information? any suggestion
Tala
2022 年 3 月 30 日
just copy and paste the code. it will work just fine
Mubarak Alanazi
2022 年 3 月 30 日
I mean do you have any other idea that to present this data in better way.
Tala
2022 年 3 月 30 日
if your data is share-able, please do so, I will take a look
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.
Tala
2022 年 3 月 30 日
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
2022 年 3 月 30 日
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'})
Mubarak Alanazi
2022 年 3 月 30 日
thanks
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!Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の 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)
