0% found this document useful (0 votes)
34 views

All 'H:/Matlabp' 'CT - XLSX': %S Num2Str (A)

The document loads data from an Excel file, performs sorting and calculations on the data, and displays the results. It reads data from a Excel file into matrices A and B, transposes and sorts B, calculates the mean of a subset of the sorted data and rounds it up, and displays the original and rounded mean values on graphs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

All 'H:/Matlabp' 'CT - XLSX': %S Num2Str (A)

The document loads data from an Excel file, performs sorting and calculations on the data, and displays the results. It reads data from a Excel file into matrices A and B, transposes and sorts B, calculates the mean of a subset of the sorted data and rounds it up, and displays the original and rounded mean values on graphs.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

clc

clear all
cd('H:/matlabP')
a=xlsread('CT.xlsx')
b=a(:,2:6)
c=transpose(b)
d=sort(c)
e=d(3:5,:)
x=sum(e)
y=x/3
z=ceil(y)
%s=num2str(a)
text(.3,.3,num2str(a))
text(.9,.3,num2str(transpose(z)))

a =
131080
131090
131063
131061

18
17
20
19

17
20
18
20

b =
18
17
20
19

17
20
18
20

20
17
17
18

15
19
18
20

18
17
20
15
18

17
20
17
19
16

20
18
17
18
19

19
20
18
20
17

15
17
18
18
20

16
17
17
19
20

17
18
18
19
20

17
18
19
20
20

c =

d =

e =18
18
20

17
19
20

18
19
20

19
20
20

x =56

56

57

59

18
16
19
17

20
17
17
18

15
19
18
20

18
16
19
17

y =18.6667
z =19
19
s =
131080
131090
131063
131061

18.6667
19.0000
19
20
18
17
20
19

17
20
18
20

19.6667

20
17
17
18

15
19
18
20

18
16
19
17

1
0.9
0.8
0.7
0.6
0.5
0.4

131080
131090
131063
131061

0.3
0.2

18
17
20
19

17
20
18
20

20
17
17
18

15
19
18
20

18
16
19
17

19
19
19
20

0.1
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

clc
clear all
cd('H:/matlabP')
A=xlsread('CT.xlsx')
B=A(:,2:6)
C=transpose(B)
D=sort(C)
E=D(3:5,:)
X=sum(E)
Y=X/3
Z=ceil(Y)
S=num2str(A)
text(.1,.3,num2str(A))
text(.7,.3,num2str(transpose(Z)))

A =
131001
131002
131004
131007

20
17
15
19

17
17
12
20

B =
20
17
15
19

17
17
12
20

19
17
17
18

18
19
14
16

20
17
19
18
15

17
17
17
19
10

15
12
17
14
13

19
20
18
16
14

15
17
18

10
17
17

12
13
14

14
16
18

C =

D =

15
10
13
14

19
17
17
18

18
19
14
16

15
10
13
14

19
20

17
19

15
17

19
20

18
19
20

17
17
19

14
15
17

18
19
20

E =

X =57

53

46

Y =19.0000
Z = 19

57

17.6667
18

15.3333

16

19.0000

19

S =
131001
131002
131004
131007

20
17
15
19

17
17
12
20

19
17
17
18

18
19
14
16

15
10
13
14

1
0.9
0.8
0.7
0.6
0.5
0.4

131001
131002
131004
131007

0.3
0.2

20
17
15
19

17
17
12
20

19
17
17
18

18
19
14
16

15
10
13
14

19
18
16
19

0.1
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

clear all
cd('H:\')
a=xlsread('classtest.xlsx')
b=a(:,2:6)
c=transpose(b)
d=sort(c,1,'descend')
e=d(1:3,:)
x=sum(e)
p=x/3
z=ceil(p)
s=num2str(a)
text(.1,.5,num2str(a))
text(.3,.5,num2str(transpose(z)))

a=
131060

14

18

15

131070

16

14

10

131080

18

15

131090

17

13

17

b=
14

18

15

17

16

16

14

10

19

19

18

15

17

13

17

19

14

16

18

17

18

14

15

13

15

10

17

19

20

19

16

19

18

10

18

19

20

19

17

19

18

17

16

16

18

17

20

c=

17

d=

18
10

17
19
20
19

16
19
18
10

15

14

15

13

14

10

18

19

20

19

17

19

18

17

16

16

18

17

10

e=

x = 51

54

56

53

p = 17.0000 18.0000 18.6667 17.6667


z = 17

18

s =131060

19
14

18
18

15

131070

16

14

10

131080

18

15

131090

17

13

17

17
19
20

16
19
18

19

10

1
0.9
0.8
0.7
0.6

131060
131070
131080
131090

0.5
0.4

14
16
18
17

17 18
18 14
19 15
18 13

15
10
9
17

17
19
20
19

16
19
18
10

0.3
0.2
0.1
0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

You might also like