Question: Generate a random integer in range [ 1 , 2 0 ] and save that as num 1 . Generate a random integer in range

Generate a random integer in range [1,20] and save that as num1. Generate a random integer in range [1,20] and save that as num2. Create two vectors vec1 and vec2 with integers in range [-10,10] with length of the vectors as the random integers generated in the previous step (vec1 with num1 as number of columns and vec2 with num2 as number of columns.) Using a for loop, plot each point in vec1 with a red square. Using for loop, plot each point in vec2 with a blue * on the same graph. For the plot:o x values for the graph are the number of values in each vector (For example: for a vector of length 5, x would be 1 to 5.)o y values for the graph will be the elements in each vector. o For example if vec1=[12,15,11,7,9], x would be the indices of the vector i.e 1,2,3,4,5 and y would be values in the vector i.e 12,15,11,7,9 Add x and y axes labels and a title for the plot

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 Programming Questions!