# boxplot

5 views (last 30 days)
sz on 3 Dec 2021
Edited: Atsushi Ueno on 3 Dec 2021
plot_box_scatter
というのをダウンロードして

やり方を教えていただきたいです。
H=[0.548 0.4558 0.5265 0.6672 0.6672 0.4702 0.6463 0.6138 0.486 0.3974 0.5638 0.5938 0.6179 0.5156]
S=[0.5056 0.5037 0.437 0.5644 0.4939 0.5133 0.5654 0.4365 0.5048 0.6218 0.5089 0.5975 0.5836 0.618]
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Accepted Answer

Atsushi Ueno on 3 Dec 2021
Edited: Atsushi Ueno on 3 Dec 2021
% Example:
A = rand(100,1); B = rand(20,1); C = rand(60,1); data = [A;B;C];
groupIdx = [ones(size(A)); 2* ones(size(B)); 3* ones(size(C))];
plot_box_scatter(data, groupIdx);

H = [0.548,0.4558,0.5265,0.6672,0.6672,0.4702,0.6463,0.6138,0.486,0.3974,0.5638,0.5938,0.6179,0.5156];
S = [0.5056,0.5037,0.437,0.5644,0.4939,0.5133,0.5654,0.4365,0.5048,0.6218,0.5089,0.5975,0.5836,0.618];
% data: M*1のベクトル、Mは総データ数
data = [H';S'];
% groupIdx: M*1のベクトル、データの所属グループを示すマーク
groupIdx = [ones(size(H')); 2* ones(size(S'))];
% pos: N*1のベクトル、Nは総グループ数、各ボックスプロットの位置、デフォルト:1
pos = [1;2];
% color: N*1のセル配列、各グループの散布色、デフォルト:ランダム
color = {'r', 'b'};
% symbol: N*1のセル配列、各グループの散布記号、デフォルト:ランダム
symbol = {'o', '*'};
% opt: ボックスの中心に沿って散布(0)、ボックスいっぱいに散布(1)、デフォルト:1
opt = 0;
plot_box_scatter(data, groupIdx, pos, color, symbol, opt);
##### 0 CommentsShow -2 older commentsHide -2 older comments

Sign in to comment.

### Categories

Find more on サポート ベクター マシン回帰 in Help Center and File Exchange

### Community Treasure Hunt

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

Start Hunting!