0% found this document useful (0 votes)
26 views11 pages

Tugas-2 - Indra Fikriyana D - 2111181095

This document provides a summary of Numerical Analysis Practice 2 created by Rifqi Al Hakim, a student with ID 2111181069 in Group 2 of the Mechanical Engineering program at the Jenderal Achmad Yani University in Cimahi, Indonesia in 2020. It contains examples of basic arithmetic, logical, trigonometric, exponential, matrix and vector operations in MATLAB.

Uploaded by

Arif Vey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views11 pages

Tugas-2 - Indra Fikriyana D - 2111181095

This document provides a summary of Numerical Analysis Practice 2 created by Rifqi Al Hakim, a student with ID 2111181069 in Group 2 of the Mechanical Engineering program at the Jenderal Achmad Yani University in Cimahi, Indonesia in 2020. It contains examples of basic arithmetic, logical, trigonometric, exponential, matrix and vector operations in MATLAB.

Uploaded by

Arif Vey
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

LATIHAN 2

PRAKTIKUM ANALISA NUMERIK

Dibuat Oleh :
RIFQI AL HAKIM
2111181069
KELOMPOK 2

PROGRAM STUDI S-1


JURUSAN TEKNIK MESIN – FAKULTAS TEKNOLOGI MANUFAKTUR
UNIVERSITAS JENDERAL ACHMAD YANI
CIMAHI
2020
>> 4+6-7

ans =

>> 55-16

ans =

39

>> ans+11

ans =

50

>> 4*10

ans =

40

>> 100/4
ans =

25

>> sqrt(25)

ans =

>> sqrt(-10)

ans =

0.0000 + 3.1623i

>> 2^3

ans =

>> 8^(1/3)
ans =

>> a = 4

a=

>> A = 6

A=

>> a

a=

>> A = 6;

>> a = 4, A = 6; x = 1;
a=

>> pi

ans =

3.1416

>> format long

>> pi

ans =

3.141592653589793

>> format short

>> cos (0)

ans =

>> cos (pi/3)


ans =

0.5000

>> a = [1 2 3 4 5]

a=

1 2 3 4 5

>> b = [2;4;6;8;10]

b=

10

>> A = [1 2 3; 4 5 6; 7 8 9]

A=
1 2 3

4 5 6

7 8 9

>> A = [1 2 3

456

7 8 9]

A=

1 2 3

4 5 6

7 8 9

>> who

Your variables are:

A E U a ans b t x

>> whos

Name Size Bytes Class Attributes

A 3x3 72 double

E 2x3 48 double
U 1x3 24 double

a 1x5 40 double

ans 1x1 8 double

b 5x1 40 double

t 1x6 48 double

x 1x1 8 double

>> b(4)

ans =

>> A(2,3)

ans =

>> E = zeros (2,3)

E=

0 0 0

0 0 0
>> U = ones (1,3)

U=

1 1 1

>> t = 1:5

t=

1 2 3 4 5

>> t = 1 : 0.5 : 5

t=

Columns 1 through 7

1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000

Columns 8 through 9

4.5000 5.0000
>> t = 10 : -1 : 5

t=

10 9 8 7 6 5

>> A (2,:)

ans =

4 5 6

>> A (:,1)

ans =

>> t(2:4)

ans =

9 8 7
>> linspace (0,1,6)

ans =

0 0.2000 0.4000 0.6000 0.8000 1.0000

>> logspace (-1, 2, 4)

ans =

0.1000 1.0000 10.0000 100.0000

>>

You might also like