HOW do I plot 3D normal distribution in MATLAB

조회 수: 9 (최근 30일)
maede mandi
maede mandi 2021년 11월 7일
답변: maede mandi 2021년 11월 7일
Hi everyone. I have a problem with my code. I can’t write the normal distribution code, and after that plot that in 3D. I want you to continue line 21. Thanks.
clc
clear all
heightm = 175+7*randn(1,100);
heightm =sort (heightm);
weightm = 80+5*randn(1,100);
weightm =sort (weightm);
%TWO classes
heightw = 160+6*randn(1,150);
heightw =sort (heightw);
weightw = 60+4*randn(1,150);
heightw =sort (heightw);
%feature vector 2*1
feature_vectorm = [heightm;weightm ];
feature_vectorw = [heightw;weightw ];
% mij (mean vector)
m2m= mean(feature_vectorm');
m2w= mean(feature_vectorw');
  댓글 수: 1
Image Analyst
Image Analyst 2021년 11월 7일
Not sure what is to be plotted. You forgot to tell us. What do you want along each (x, y, and z) axis? Have you tried plot3()?
To get the distribution, have you tried the histogram() function?
Is this homework?

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

답변 (1개)

maede mandi
maede mandi 2021년 11월 7일

카테고리

Help CenterFile Exchange에서 Histograms에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by