From the course: Learning Julia

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Arrays

Arrays - Julia Tutorial

From the course: Learning Julia

Start my 1-month free trial

Arrays

- [Instructor] In this chapter we're going to learn about some of Julia's data structures for working with collections. And we're going to start off by looking at arrays. So here in chapter five I'm going to open up the arrays_start file. So an array is an ordered collection of elements. And this data structure is found in most modern programming languages. In Julia you can create an array using square bracket notation like this. So I'll simply write a variable, and I'll give it some values. And if you've worked in JavaScript or Python, then this probably looks pretty familiar to you. In this case I have it specify the type of data that the array will hold so Julia will try to determine it. And you can see that these are all integers. So once we've defined the array, we can print it out. And we can also perform some other operations on the array such as determining what type it is. So I'll print out the type of array. And I'll also print out the array size by using the length…

Contents