I have a 20x20 matrix of histogram values. How can I plot this using the histogram2 function? I do not have the x and y values.

조회 수: 1 (최근 30일)
Hello,
I'd like to plot a 20x20 matrix of histogram values using the histogram2 function? I was able to plot it using the heatmap function but this is not exactly what I want. I do not have the x and y values, so is it possible to plot it with histogram2?
  댓글 수: 1
Torsten
Torsten 2022년 3월 10일
How did you arrive at this 20x20 matrix ? You write it contains histogram values, but what are "histogram values" in your context ? Do the matrix values come from a Monte-Carlo simulation of a two-dimensional probability density function ? Then try MATLAB's "surf" function for display.

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

답변 (1개)

Walter Roberson
Walter Roberson 2022년 3월 10일
data = randi([0 9], 20, 20);
bar3(data)

카테고리

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