plot x bar and R

조회 수: 3 (최근 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 CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by