フィルターのクリア

plot x bar and R

4 ビュー (過去 30 日間)
karim Soussou
karim Soussou 2021 年 12 月 26 日
回答済み: Star Strider 2021 年 12 月 27 日
i have some set of data that i need to plot x bar and R to
s No 1 2 3 4
1 44 26 24 34
2 50 48 51 43
3 32 28 26 22
4 52 55 56 44
5 16 16 21 26
6 36 36 35 31
7 21 22 18 21
8 29 21 23 22
9 26 46 44 14
10 24 22 22 44
11 18 24 24 49
12 24 20 26 23
13 19 21 27 28
14 8 11 12 12
15 24 18 27 24
16 56 52 56 50
17 32 22 18 25
18 8 12 11 17
19 51 54 52 49
  3 件のコメント
karim Soussou
karim Soussou 2021 年 12 月 27 日
I don’t know how to enter all this data to plot the x bar and R
Voss
Voss 2021 年 12 月 27 日
Where is the data now? In a text file? If it is in a file (of any kind), please attach the file here so that people can advise you on the correct way to get the data into your MATLAB workspace.

サインインしてコメントする。

回答 (1 件)

Star Strider
Star Strider 2021 年 12 月 27 日
I have absolutely no idea what and R are.
Two possibilities —
M = [1 44 26 24 34
2 50 48 51 43
3 32 28 26 22
4 52 55 56 44
5 16 16 21 26
6 36 36 35 31
7 21 22 18 21
8 29 21 23 22
9 26 46 44 14
10 24 22 22 44
11 18 24 24 49
12 24 20 26 23
13 19 21 27 28
14 8 11 12 12
15 24 18 27 24
16 56 52 56 50
17 32 22 18 25
18 8 12 11 17
19 51 54 52 49];
T1 = array2table(M, 'VariableNames',{'s No','1','2','3','4'})
T1 = 19×5 table
s No 1 2 3 4 ____ __ __ __ __ 1 44 26 24 34 2 50 48 51 43 3 32 28 26 22 4 52 55 56 44 5 16 16 21 26 6 36 36 35 31 7 21 22 18 21 8 29 21 23 22 9 26 46 44 14 10 24 22 22 44 11 18 24 24 49 12 24 20 26 23 13 19 21 27 28 14 8 11 12 12 15 24 18 27 24 16 56 52 56 50
VN = T1.Properties.VariableNames;
figure
plot(T1.('s No'), T1{:,2:5})
grid
hl = legend(VN{2:5}, 'Location','SW');
title(hl, '$\bar{x}$', 'Interpreter','latex')
xlabel('s No')
ylabel('R')
figure
surfc(T1{:,2:5})
yticks(T1{:,1})
xlabel(['$' VN{1} '$'], 'Interpreter','latex')
ylabel('$\bar{x}$', 'Interpreter','latex')
zlabel('$R$', 'Interpreter','latex')
Make apopropriate changes to get the desired result.
.

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by