Posts

Showing posts from March, 2022

100 Julia exercises with solutions

100_Julia_exercises_First50 Here is a Julia version of exercises with solutions which is based on the exercises given here: https://github.com/rougier/numpy-100 1. Import the julia package LinearAlgebra under the name la 1 import LinearAlgebra as la #or 2 import LinearAgebra 3 const la = LinearAlgebra   2. Print the version of julia package Javis xxxxxxxxxx 2 1 ] 2 status Javis   3. Create a zero vector of size 10 and of type Int64 xxxxxxxxxx 1 1 a = zeros ( Int64 , 10 )   4. How to find the memory size of any array in bytes xxxxxxxxxx 2 1 sizeof ( a ) 2 length ( a ) * sizeof ( eltype ( a ))   5. How to get the documentation of the Julia zero function from the command line? xxxxxxxxxx 1 1 ? zeros   6. Create a Int vector of size 10 but the fifth value which is 1 (in two lines of code) xxxxxxxxxx 2 1 a = zeros ( Int , 10 ) 2 a [ 5 ] = 1   7. Create a vector with values ranging from 10 to 49 xxxxxxxxxx 2 1 a = [ 10 : 49 ;] 2 a = coll...