solution of Linear Equations in octave

Create matrix  for linear equations :2X+4Y+5Z=1

                                                          3X+6Y+7Z=2

                                                          4X+7Y+8Z=3

octave:1>A=[2,4,5;3,6,7;4,7,8]

octave:2>A  (it will display matrix A).

octave:3> b=[1;2;3]

octave:4>b (it will display matrix b).

Now calculate x,y and z.

octave:5>x=A/b

octave:6>x (it will show value of x,y and z.)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s