Question: Though this vector is numeric, we can just as easily define a vector of strings, or even a vector of vectors. If the elements of

Though this vector is numeric, we can just as easily define a vector of strings, or even a vector of vectors. If the elements of a Vector have type T, then the vector has type Array {T,1}. Julia has a convenient type alias for one-dimensional arrays called Vector, so Array{T,1} is equivalent to Vector {T}.
We can create a vector x by listing comma-separated elements between square brackets [ and ]:
1x=[10,20,30,40,50]
Run
Revert
783ms
5-element Array Int64,1}:
10
20
30
40
50
Julia also doesn't mind if we use semicolons to separate elements rather than commas:
1y=[10;20;30;40;50]
 Though this vector is numeric, we can just as easily define

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!