Transcribed Image Text: Octave assignment 1-Introduction to Octave
This assignment is meant to be a gentle introduction to Octave, the free version of Matlab. It
assumes that you have no prior coding experience.
Download Octave and run it or use https://octave-online.net/
Learn the basics of the Octave GUI.
• Learn how to create a short executable file called an m-file (.m extension) and run it.
• Learn what a data type is.
• Learn how to declare variables of different data types.
• Learn how to create matrices.
• Learn how to use several of Octave’s functions for creating objects with random
1.) Create a file call it with the form exercise_1_first name_last name. Include the
underscores in your file name. At the top of the file add the comment ““My first Octave
assignment. I’m so excited, I just can’t hide it.”
2.) Create the following variables
a = 2.3;
b = -87.3;
A = [1,2; 4,5];
Create a matrix 2 × 2 B using the rand() function.
Create two random complex numbers, call them z, and z2 using the randi()
function. Both the real and complex components should be random integers in the
Make sure to include the semicolons. Otherwise, the numbers are printed to the screen.
For intensive applications, constantly printing to the screen slows the software down.
3.) Add the following lines of code. You should notice the workspace fill up with variables
after running your file. I want you to print to the screen for this part. Normally, you
wouldn’t unless you were looking for mistakes.
а — b
a * A – 2 + b * B
• 3 + z1 – 4 * Z2
You will submit your work electronically through blackboard.