About HPC Systems Software User Guides Education Partners

  / gears / hpc / education / tutorials / matlab / linux


Introduction

Definition

Example 01

Example 02

Example 03

Example 04

Example 05

Example 06

Example 07

Example 08

Example 09

Example 10

Example 11

Example 12

Example 13

Example 14

Example 15

Example 16

Example 17

Example 18

References

Example 11

mean(), max(), min(), std(), diff()


GIVEN: A data file

REQUIRED: Perform basic statistical analysis

SOLUTION:

Generate Example11.data

File

New

Example11.m

load Example11.data

days=1:31;

mean(Example11(:,1))

max(Example11(:,2))

min(Example11(:,2))

std(Example11(:,2))

diff(Example11(:,3))

Homework:

a. Add a title

b. Label the x-axis

c. Label the y-axis

d. Turn the grid on

File

12 8 18
15 9 22
12 5 19
14 8 23
12 6 22
11 9 19
15 9 15
8 10 20
19 7 18
12 7 18
14 10 19
11 8 17
9 7 23
8 8 19
15 8 18
8 9 29
10 7 17
12 7 22
9 8 19
12 8 21
12 8 20
10 9 17
13 12 18
9 10 20
10 6 22
14 7 21
12 5 22
13 7 18
15 10 23
13 11 24
12 12 22

Example
ans =

   11.9677


ans =

    12


ans =

     5


ans =

    1.7646


ans =

     4
    -3
     4
    -1
    -3
    -4
     5
    -2
     0
     1
    -2
     6
    -4
    -1
    11
   -12
     5
    -3
     2
    -1
    -3
     1
     2
     2
    -1
     1
    -4
     5
     1
    -2
    

Please send questions or suggestions about this web page to beatnic@aset.psu.edu

ASET | ITS | Penn State