필터 지우기
필터 지우기

code for plotting more than one histogram in MATLAB

조회 수: 35 (최근 30일)
Oluwaseun
Oluwaseun 2011년 9월 26일
댓글: Mauricio Cabrera 2021년 11월 3일
Hi; I am new to MATLAB and i have this question to ask: is it possible for one to write a code in MATLAB such that different histograms(say more than two) are plotted and shown on the screen at the same time?
Thank you in anticipation of your response.
Simon.

답변 (1개)

Aurelien Queffurust
Aurelien Queffurust 2011년 9월 26일
subplot should achieve what you want :
x = -4:0.1:4;
y = randn(1000,2);
figure
subplot(2,1,1)
hist(y(:,1),x)
subplot(2,1,2)
hist(y(:,2),x)
  댓글 수: 1
Mauricio Cabrera
Mauricio Cabrera 2021년 11월 3일
Gracias me ayudo, cabe destacar que ahora la función hist() se está actualizando por histrogram(). Saludos.

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

카테고리

Help CenterFile Exchange에서 2-D and 3-D Plots에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by