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
GNU Octave Beginner's Guide
GNU Octave Beginner's Guide

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
Profile Icon Jesper Schmidt Hansen
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (19 Ratings)
Paperback Jun 2011 280 pages 1st Edition
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
Arrow left icon
Profile Icon Jesper Schmidt Hansen
Arrow right icon
Free Trial
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2 (19 Ratings)
Paperback Jun 2011 280 pages 1st Edition
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial
eBook
S$36.99 S$52.99
Paperback
S$66.99
Subscription
Free Trial

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing
Table of content icon View table of contents Preview book icon Preview Book

GNU Octave Beginner's Guide

Chapter 2. Interacting with Octave: Variables and Operators

Octave is specifically designed to work with vectors and matrices. In this chapter, you will learn how to instantiate such objects (or variables), how to compare them, and how to perform simple arithmetic with them. Octave also supports more advanced variable types, namely, structures and cell arrays, which we will learn about. With Octave, you have an arsenal of functionalities that enable you to retrieve information about the variables. These tools are important to know later in the book, and we will go through the most important ones.

In detail, we will learn how to:

  • Instantiate simple numerical variables i.e. scalars, vectors, and matrices.

  • Instantiate text string variables.

  • Instantiate complex variables.

  • Retrieve variable elements through simple vectorized expressions.

  • Instantiate structures, cell arrays, and multidimensional arrays.

  • Get information about the variables.

  • Add and subtract numerical variables.

  • Perform matrix products...

Simple numerical variables


In the following, we shall see how to instantiate simple variables. By simple variables, we mean scalars, vectors, and matrices. First, a scalar variable with name a is assigned the value 1 by the command:

octave:1> a=1
a = 1

That is, you write the variable name, in this case a, and then you assign a value to the variable using the equal sign. Note that in Octave, variables are not instantiated with a type specifier as it is known from C and other lower-level languages. Octave interprets a number as a real number unless you explicitly tell it otherwise1.

You can display the value of a variable simply by typing the variable name:

octave:2>a
a = 1

Let us move on and instantiate an array of numbers:

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

Octave interprets this as the row vector:

(2.1)

rather than a simple one-dimensional array. The elements (or the entries) in a row vector can also be separated by commas, so the command above could have been:

octave:3> b = [1,...

Time for action - manipulating arrays


  1. 1. To delete the second column in A, we use:

octave:14> A(:,2) = []
A =
1 3
1 3
  1. 2. We can extend an existing array, for example:

octave:15 > b = [b 4 5]
b =
1 2 3 4 5
  1. 3. Finally, try the following commands:

octave:16> d = [2 4 6 8 10 12 14 16 18 20]
d =
2 4 6 8 10 12 14 16 18 20
octave:17> d(1:2:9)
ans =
2 6 10 14 18
octave:18> d(3:3:12) = -1
d =
2 4 -1 8 10 -1 14 16 -1 20 0 -1

What just happened?

In Command 14, Octave interprets [] as an empty column vector and column 2 in A is then deleted in the command. Instead of deleting a column, we could have deleted a row, for example as an empty column vector and column 2 in A is then deleted in the command.

octave:14> A(2,:)=[]

On the right-hand side of the equal sign in Command 15, we have constructed a new vector given by [b 4 5], that is, if we write out b, we get [1 2 3 4 5] since b=[1 2 3]. Because of the equal sign, we assign the variable b to this vector and delete the existing value...

Structures and cell arrays


In many real life applications, we have to work with objects that are described by many different types of variables. For example, if we wish to describe the motion of a projectile, it would be useful to know its mass (a scalar), current velocity (a vector), type (a string), and so forth. In Octave, you can instantiate a single variable that contains all this information. These types of variables are named structures and cell arrays.

Structures

A structure in Octave is like a structure in C—it has a name, for example projectile, and contains a set of fields3 that each has a name, as shown in the following figure:

We can refer to the individual structure field using the.character:

structurename.fieldname

where structurename is the name of the structure variable, and fieldname is (as you may have guessed) the field's name.

3or members in C terminology

To show an example of a structure, we can use the projectile described above. Let us therefore name the structure variable...

Time for action - instantiating a structure


  1. 1. To set the projectile mass, we can use:

octave:32>projectile.mass = 10.1
projectile =
{
mass = 10.100
}
  1. 2. The velocity field is set in a similar fashion:

octave:33>projectile.velocity = [1 0 0]
projectile =
{
mass = 10.100
velocity =
0 0
}
  1. 3. We can also set the text field as usual:

octave:34>projectile.type = "Cannonball"
projectile =
{
mass = 10.100
velocity =
1 0 0
type = Cannonball
}

and so on for position and whatever else could be relevant.

What just happened?

Command 32 instantiates a structure variable with the name projectile by assigning a field named mass the value 10.100. At this point, the structure variable only contains this one field.

In Commands 33 and 34, we then add two new fields to the structure variable. These fields are named velocity and type. It is, of course, possible to keep adding new fields to the structure.

Instead of typing in one structure field at a time, you can use the struct function. (In the next chapter...

Time for action - instantiating a cell array


  1. 1. To instantiate a cell array with the same data as the projectile structure above, we can use:

octave:44> projectile = {10.1, [1 0 0], "Cannonball"}
projectile =
{
[1,1] = 10.1
[1,2] =
1 0 0
[1,3] = Cannonball
}
  • The numbers in the square brackets are then the row indices and column indices, respectively.

  1. 2. To access a cell, you must use curly brackets:

octave:45> projectile{2}
ans =
1 0 0
  1. 3. You can have two-dimensional cell arrays as well. For example:

octave:46> projectiles = {10.1, [1 0 0], "Cannonball"; 1.0, [0 0 0], "Cartridge"}
projectile =
{
[1, 1] = 10.100
[2, 1] = 1
[1, 2] =
1 0 0
[2, 2] =
0 0 0
[1, 3] = Cannonball
[2, 3] = Cartridge
}
  1. 4. To access the values stored in the cell array, simply use:

octave:47> projectiles{2,3}
ans = Cartridge

What just happened?

Command 44 instantiates a cell array with one row and three columns. The first cell contains the mass, the second cell the velocity, and the third cell the string "Cannonball...

Getting information


In this section, we will learn how to obtain information about the variables that have been instantiated. This is particularly useful when you have forgotten the names, sizes, or when you have loaded data from files (more on the latter in Chapter 4).

Time for action - using whos


We are working with quite a few variables now. We can list them all with whos:

octave:48>whos
Variables in the current scope:

Attr

Name

Size

Bytes

 

Class

====

====

====

=====

 

=====

 

A

2x2

32

 

double

 

B

2x2x2

128

 

double

 

T

2x6

12

 

char

 

Z

2x2

64

 

double

 

a

1x1

8

 

double

 

ans

1x9

9

 

char

 

b

1x5

40

 

double

 

c

3x1

24

 

double

 

d

1x12

96

 

double

 

projectile

1x3

42

 

cell

 

projectiles

2x3

83

 

cell

 

s

1x2

83

 

struct

 

t

1x11

11

 

char

 

z

1x1

16

 

double

Total is 81 elements using 648 bytes

What just happened?

As seen above, whos prints out five columns. The first column can have values g or p, which means that the variable is global or persistent. We shall return to what these qualifiers mean in Chapter 5. In our case, all the variables are what are named local, which is not stated explicitly by the command whos. A local variable is characterized by being visible and therefore accessible to a given workspace...

A few things that make life easier


Imagine that you wish to generate a sequence of numbers in the interval -2.1 to 0.5 (including -2.1 and 0.5) with an incremental spacing of 0.2. This is rather tedious to do by hand and is very error prone, because it involves typing a lot of digits. Fortunately, Octave provides you with a very convenient way to do this (note that we now assign the variable b a new value):

octave:60> b = [-2.1:0.2:0.5]
b =
Columns 1 through 7
-2.1000 -1.9000 -1.7000 -1.5000 -1.3000 -1.1000 -0.9000
Columns 8 through 14
-0.7000 -0.5000 -0.3000 -0.1000 0.1000 0.3000 0.5000

If we had done this by hand instead, we should have typed in:

octave:61> size(b)
ans =
1 14

14 numbers. You can also use negative increments if the interval starting value is larger than the end value. If you do not provide an incremental value, Octave assumes 1.

An important point is that if we have chosen an increment of, say 0.4, in Command 60, Octave will give us a number sequence starting from ...

Basic arithmetic


Octave offers easy ways to perform different arithmetic operations. This ranges from simple addition and multiplication to very complicated linear algebra. In this section, we will go through the most basic arithmetic operations, such as addition, subtraction, multiplication, and left and right division. In general, we should think of these operations in the framework of linear algebra and not in terms of arithmetic of simple scalars.

Addition and subtraction

We begin with addition.

Time for action - doing addition and subtraction operations


  1. 1. I have lost track of the variables! Let us start afresh and clear all variables first:

octave:66> clear
  • (Check with whos to see if we cleared everything).

  1. 2. Now, we define four variables in a single command line(!)

octave:67> a = 2; b=[1 2 3]; c=[1; 2; 3]; A=[1 2 3; 4 5 6];
  • Note that there is an important difference between the variables b and c; namely, b is a row vector, whereas c is a column vector.

  1. 3. Let us jump into it and try to add the different variables. This is done using the + character:

octave:68>a+a
ans = 4
octave:69>a+b
ans =
3 4 5
octave:70>b+b
ans =
2 4 6
octave:71>b+c
error: operator +: nonconformant arguments (op1 is 1x3, op2 is 3x1)

Note

It is often convenient to enter multiple commands on the same line. Try to test the difference in separating the commands with commas and semicolons.

What just happened?

The output from Command 68 should be clear; we add the scalar a with itself. In Command 69...

Time for action - doing multiplication operations


Let us try to perform some of the same operations for multiplication as we did for addition:

octave:75> a*a
ans = 4
octave:76> a*b
ans =
2 4 6
octave:77> b*b
error: operator *: nonconformant arguments (op1 is 1x3, op2 is 1x3)
octave:78> b*c
ans = 14

What just happened?

From Command 75, we see that * multiplies two scalar variables just like standard multiplication. In agreement with linear algebra, we can also multiply a scalar by each element in a vector as shown by the output from Command 76. Command 77 produces an error—recall that b is a row vector which Octave also interprets as a 1 x 3 matrix, so we try to perform the matrix multiplication (1 x 3)(1 x 3), which is not valid. In Command 78, on the other hand, we have (1 x 3)(3 x 1) since c is a column vector yielding a matrix with size 1 x 1, that is, a scalar. This is, of course, just the dot product between b and c.

Let us try an additional example and perform the matrix...

Time for action - doing left and right division


  1. 1. We need to instantiate the coefficient matrix A and vector y first:

octave:93> A=[2 1 -3; 4 -2 -2; -1 0.5 -0.5]; y = [1; 3; 1.5];
  1. 2. The solution to the linear equation system, Equation (2.6), is then found directly via the command:

octave:94> A\y
ans =
-1.6250
-2.5000
-2.2500
  • Easy!

What just happened?

It should be clear what happened. In Command 93, we instantiated the matrix A and the vector y that define the linear equation system in Equation (2.6). We then solve this system using the left division operator. Later in Chapter 6, we will investigate how the left division operator performs for very large systems.

Let us try the right division operator, even though we know that it will cause problems:

octave:95> A/y
error: operator /: nonconformant arguments (op1 is 3x3, op2 is 3x1)

We see the expected error message. The right division operator will, however, work in the following command:

octave:96> A/A
ans =
1.0000 -0.0000 -0.0000...

Comparison operators and precedence rules


In the previous section, we discussed the basic arithmetic operations. In this section, we will learn how to compare different variables. Octave (like many other programming languages) uses very intuitive operator characters for this. They are:

x==y

Evaluates to true if x equals y

x>y

Evaluates to true if x is larger than y

x<y

Evaluates to true if x is smaller than y

x>=y

Evaluates to true if x is greater than or equal to y

x<=y

Evaluates to true if x is smaller than or equal to y

x!=y

Evaluates to true if x is not equal to y

For Octave's comparison operators, true is equivalent to a non-zero value and false is equivalent to 0. Let us see a few examples—recall the matrix A from Command 93:

octave:108> A(2,1) == 1
ans = 1
octave:109>A(2,1) == 2
ans = 0
octave:110> A(2,1) > 0
ans = 1
octave:111> A(2,1) != 4
ans = 1

Instead of using != for "not equal to", you can use ~=.

You may be familiar...

Time for action - working with precedence rules


  1. 1. Let us see an example:

octave:117> A*y + a
ans =
2.5000
-3.0000
1.7500
  • Here, Octave first performs the matrix multiplication between A and y, and then adds a to that result. We say that multiplication has higher precedence than addition.

  1. 2. Let us try two other examples:

octave:118> A*y.^2
ans =
4.2500
-18.5000
2.3750
octave:119> (A*y).^2
ans =
0.2500
25.0000
0.0625

What just happened?

In command 118, because the .^ operator has higher precedence than *, Octave first calculates element-wise power operation y.^2, and then performs the matrix multiplication. In command 190, by applying parenthesis, we can perform the matrix multiplication first, and then do the power operation on the resulting vector.

Note

The precedence rules are given below for the operators that we have discussed in this chapter:

When in doubt, you should always use parenthesis to ensure that Octave performs the computations in the order that you want.

Pop quiz - understanding...

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...

Summary


We went through a lot of the basics in this chapter! Specifically, we learned:

  • How to instantiate scalar, vector, and matrix variables.

  • How to instantiate complex variables.

  • How to instantiate a text string.

  • How to access and change the values of array elements.

  • About structures, cell arrays, and multidimensional arrays.

  • How to retrieve important information about the variables.

  • How to add and subtract vectors and matrices.

  • About matrix multiplication.

  • Solving linear equation systems.

  • How to compare scalars, vectors, and matrices.

  • Some additional helpful functionality.

  • Precedence rules.

In the next chapter, we will learn about Octave functions and how to do plotting. We shall make use of many of the things that we have just learned in this chapter.

Left arrow icon Right arrow icon

Key benefits

  • The easiest way to use GNU Octave's power and flexibility for data analysis
  • Work with GNU Octave's interpreter ‚Äì declare and control mathematical objects like vectors and matrices
  • Rationalize your scripts and control program flow
  • Extend GNU Octave and implement your own functionality
  • Get to know the vast built-in functionality that GNU Octave has to offer
  • Build your own GNU Octave toolbox package to solve complex problems
  • Learn Octave the simple way, with real-world examples and plenty of screenshots provided throughout the book

Description

Today, scientific computing and data analysis play an integral part in most scientific disciplines ranging from mathematics and biology to imaging processing and finance. With GNU Octave you have a highly flexible tool that can solve a vast number of such different problems as complex statistical analysis and dynamical system studies.The GNU Octave Beginner's Guide gives you an introduction that enables you to solve and analyze complicated numerical problems. The book is based on numerous concrete examples and at the end of each chapter you will find exercises to test your knowledge. It's easy to learn GNU Octave, with the GNU Octave Beginner's Guide to hand.Using real-world examples the GNU Octave Beginner's Guide will take you through the most important aspects of GNU Octave. This practical guide takes you from the basics where you are introduced to the interpreter to a more advanced level where you will learn how to build your own specialized and highly optimized GNU Octave toolbox package. The book starts by introducing you to work variables like vectors and matrices, demonstrating how to perform simple arithmetic operations on these objects before explaining how to use some of the simple functionality that comes with GNU Octave, including plotting. It then goes on to show you how to write new functionality into GNU Octave and how to make a toolbox package to solve your specific problem. Finally, it demonstrates how to optimize your code and link GNU Octave with C and C++ code enabling you to solve even the most computationally demanding tasks. After reading GNU Octave Beginner's Guide you will be able to use and tailor GNU Octave to solve most numerical problems and perform complicated data analysis with ease.

Who is this book for?

This book is intended for anyone interested in scientific computing and data analysis. The reader should have a good level of mathematics and a basic understanding of programming will be useful, although it is not a prerequisite.

What you will learn

  • Work with the Octave interpreter
  • Declare and control different variable types
  • Use arithmetic operations between variables
  • Use logical operations
  • Control the program flow
  • Write scripts
  • Implement new functions
  • Perform complex data analysis
  • Write your own toolbox package
  • Optimize your code

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Jun 21, 2011
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781849513326
Category :
Languages :
Tools :

What do you get with a Packt Subscription?

Free for first 7 days. $19.99 p/m after that. Cancel any time!
Product feature icon Unlimited ad-free access to the largest independent learning library in tech. Access this title and thousands more!
Product feature icon 50+ new titles added per month, including many first-to-market concepts and exclusive early access to books as they are being written.
Product feature icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Product feature icon Thousands of reference materials covering every tech concept you need to stay up to date.
Subscribe now
View plans & pricing

Product Details

Publication date : Jun 21, 2011
Length: 280 pages
Edition : 1st
Language : English
ISBN-13 : 9781849513326
Category :
Languages :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
$19.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
$199.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts
$279.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just S$6 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total S$ 126.98
gnuplot Cookbook
S$59.99
GNU Octave Beginner's Guide
S$66.99
Total S$ 126.98 Stars icon

Table of Contents

8 Chapters
Introducing GNU Octave Chevron down icon Chevron up icon
Interacting with Octave: Variables and Operators Chevron down icon Chevron up icon
Working with Octave: Functions and Plotting Chevron down icon Chevron up icon
Rationalizing: Octave Scripts Chevron down icon Chevron up icon
Extensions: Write Your Own Octave Functions Chevron down icon Chevron up icon
Making Your Own Package: A Poisson Equation Solver Chevron down icon Chevron up icon
More Examples: Data Analysis Chevron down icon Chevron up icon
Need for Speed: Optimization and Dynamically Linked Functions Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Full star icon Half star icon 4.2
(19 Ratings)
5 star 47.4%
4 star 26.3%
3 star 21.1%
2 star 5.3%
1 star 0%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Mar 10, 2017
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Good for the questions posed. Yet to go through completely.
Amazon Verified review Amazon
TB (aus) Nov 08, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
I was very surprised by this book having tinkered with Octave since '96 so I was inspired to write a review.Best of all it is written specifically for Octave and I have learnt new tricks that would be hard pick up from the official documentation, which is mainly a reference. The book has a text book style with simple examples to teach good scripting techniques and the latest graphics commands. It is quite general and doesn't focus on specialised (hard core Math, Stats, Engineering) functions that come with Octave, as that's what the official documentation is for.I highly recommended getting this relatively cheap book as it will save you hours of time cross-checking between the official 'GNU Octave' documentation, the numerous Howtos, Lecture Notes, summary sheets scattered on the Net, many of which are now outdated and M@lab books just to get things going.
Amazon Verified review Amazon
Mark A. Lytle Apr 04, 2012
Full star icon Full star icon Full star icon Full star icon Full star icon 5
This is a good guide for someone with previous programming experience (at least some) or undergraduates with a math background who want to learn to use computers as a powerful math tool.The structure is well thought out, and the explanations are generally clear. The examples are well chosen also. I find myself hoping that Mr. Hanson might come out with a sequel, as Octave is rich enough to be worth more than one book.Octave is the free, open source alternative to Matlab, and will run many of the same scripts. With this entry, Octave shows it has matured, and has some momentum. I have spent about 2 weeks with this book and have only covered perhaps half of it's topics, but it is far more accessible then most college textbooks. I do recommend it for your bookshelf.
Amazon Verified review Amazon
Lugo Nov 06, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Su contenido es basico pero muy explicito en todo, muy practico y con todo lo necesario para comenzar a utilizar octave.
Amazon Verified review Amazon
Mouli Jul 03, 2021
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Best out of possibly only few books on GNU Octave. Good organization of concepts
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

What is included in a Packt subscription? Chevron down icon Chevron up icon

A subscription provides you with full access to view all Packt and licnesed content online, this includes exclusive access to Early Access titles. Depending on the tier chosen you can also earn credits and discounts to use for owning content

How can I cancel my subscription? Chevron down icon Chevron up icon

To cancel your subscription with us simply go to the account page - found in the top right of the page or at https://subscription.packtpub.com/my-account/subscription - From here you will see the ‘cancel subscription’ button in the grey box with your subscription information in.

What are credits? Chevron down icon Chevron up icon

Credits can be earned from reading 40 section of any title within the payment cycle - a month starting from the day of subscription payment. You also earn a Credit every month if you subscribe to our annual or 18 month plans. Credits can be used to buy books DRM free, the same way that you would pay for a book. Your credits can be found in the subscription homepage - subscription.packtpub.com - clicking on ‘the my’ library dropdown and selecting ‘credits’.

What happens if an Early Access Course is cancelled? Chevron down icon Chevron up icon

Projects are rarely cancelled, but sometimes it's unavoidable. If an Early Access course is cancelled or excessively delayed, you can exchange your purchase for another course. For further details, please contact us here.

Where can I send feedback about an Early Access title? Chevron down icon Chevron up icon

If you have any feedback about the product you're reading, or Early Access in general, then please fill out a contact form here and we'll make sure the feedback gets to the right team. 

Can I download the code files for Early Access titles? Chevron down icon Chevron up icon

We try to ensure that all books in Early Access have code available to use, download, and fork on GitHub. This helps us be more agile in the development of the book, and helps keep the often changing code base of new versions and new technologies as up to date as possible. Unfortunately, however, there will be rare cases when it is not possible for us to have downloadable code samples available until publication.

When we publish the book, the code files will also be available to download from the Packt website.

How accurate is the publication date? Chevron down icon Chevron up icon

The publication date is as accurate as we can be at any point in the project. Unfortunately, delays can happen. Often those delays are out of our control, such as changes to the technology code base or delays in the tech release. We do our best to give you an accurate estimate of the publication date at any given time, and as more chapters are delivered, the more accurate the delivery date will become.

How will I know when new chapters are ready? Chevron down icon Chevron up icon

We'll let you know every time there has been an update to a course that you've bought in Early Access. You'll get an email to let you know there has been a new chapter, or a change to a previous chapter. The new chapters are automatically added to your account, so you can also check back there any time you're ready and download or read them online.

I am a Packt subscriber, do I get Early Access? Chevron down icon Chevron up icon

Yes, all Early Access content is fully available through your subscription. You will need to have a paid for or active trial subscription in order to access all titles.

How is Early Access delivered? Chevron down icon Chevron up icon

Early Access is currently only available as a PDF or through our online reader. As we make changes or add new chapters, the files in your Packt account will be updated so you can download them again or view them online immediately.

How do I buy Early Access content? Chevron down icon Chevron up icon

Early Access is a way of us getting our content to you quicker, but the method of buying the Early Access course is still the same. Just find the course you want to buy, go through the check-out steps, and you’ll get a confirmation email from us with information and a link to the relevant Early Access courses.

What is Early Access? Chevron down icon Chevron up icon

Keeping up to date with the latest technology is difficult; new versions, new frameworks, new techniques. This feature gives you a head-start to our content, as it's being created. With Early Access you'll receive each chapter as it's written, and get regular updates throughout the product's development, as well as the final course as soon as it's ready.We created Early Access as a means of giving you the information you need, as soon as it's available. As we go through the process of developing a course, 99% of it can be ready but we can't publish until that last 1% falls in to place. Early Access helps to unlock the potential of our content early, to help you start your learning when you need it most. You not only get access to every chapter as it's delivered, edited, and updated, but you'll also get the finalized, DRM-free product to download in any format you want when it's published. As a member of Packt, you'll also be eligible for our exclusive offers, including a free course every day, and discounts on new and popular titles.