Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
GNU Octave Beginner's Guide

You're reading from   GNU Octave Beginner's Guide Become a proficient Octave user by learning this high-level scientific numerical tool from the ground up

Arrow left icon
Product type Paperback
Published in Jun 2011
Publisher Packt
ISBN-13 9781849513326
Length 280 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Jesper Schmidt Hansen Jesper Schmidt Hansen
Author Profile Icon Jesper Schmidt Hansen
Jesper Schmidt Hansen
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

GNU Octave
Credits
About the Author
About the Reviewers
1. www.PacktPub.com
2. Preface
1. Introducing GNU Octave 2. Interacting with Octave: Variables and Operators FREE CHAPTER 3. Working with Octave: Functions and Plotting 4. Rationalizing: Octave Scripts 5. Extensions: Write Your Own Octave Functions 6. Making Your Own Package: A Poisson Equation Solver 7. More Examples: Data Analysis 8. Need for Speed: Optimization and Dynamically Linked Functions Pop quiz - Answers

A few hints


Instead of using the left division operator to solve a linear equation system, you can do it "by hand". Let us try this using the equation system given by Equation (2.6) with the solution given in Equation (2.9). First we need to calculate the inverse of A (which exists). This is done via the inv function:

octave:120>inverse_A = inv(A)
inverse_A =
0.2500 -0.1250 -1.0000
0.5000 -0.5000 -1.0000
0.0000 -0.2500 -1.0000

We can now simply perform the matrix multiplication A 1y to get the solution:

octave:121>inverse_A*y
ans =
-1.6250
-2.5000
-2.2500

This output is similar to the output from Command 94. Now, when Octave performs the left division operation, it does not first invert A and then multiply that result with y. Octave has many different algorithms it can use for this operation, depending on the specific nature of the matrix. The results from these algorithms are usually more precise and much quicker than performing the individual steps. In this particular example, it...

You have been reading a chapter from
GNU Octave Beginner's Guide
Published in: Jun 2011
Publisher: Packt
ISBN-13: 9781849513326
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime