Matlab 2-D plot 질문입니다.

조회 수: 6 (최근 30일)
inseong Hwang
inseong Hwang 2021년 4월 20일
답변: Shreshth 2025년 3월 4일
안녕하세요.
Matlab의 Boxplot이란 함수를 이용하면 Max, Min, 25%, Median, 75%의 값들로 된 상자 그래프가 그려지는데,
이것을 Max, Min, 평균 - 표준편차, 평균(Mean), 평균 + 표준편차로 구성된 상자 그래프를 그리고 싶습니다.

답변 (1개)

Shreshth
Shreshth 2025년 3월 4일
Hello Inseong,
제 모국어는 한국어가 아니라서, 이 질문에 영어로 답변하려고 합니다. 이해해주셔서 감사합니다.
As per my understanding, you would like to plot a box graph representing maximum, minimum, mean – std. deviation, mean values, mean + std. deviation values calculated from a dataset.
You can achieve this by calculating mean and standard deviation using “mean” and “std” functions.
Here is an example showing how you can do it:
% Step 1: Calculate mean and standard deviation
mean_val = mean(data);
std_val = std(data);
% Step 2: Create new dataset
new_data = [max(data), min(data), mean_val - std_val, mean_val, mean_val + std_val];
% Step 3: Plot the box graph
figure;
boxplot(new_data);
Please refer to the following documentation to know more about:
“mean" function:
“std” function:
“boxplot” function:
I hope this resolves the issue you were facing.

카테고리

Help CenterFile Exchange에서 탐색과 시각화에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!