Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please help me Im using MATLAB Program The output needs to look like the boxes in the (1st and 2nd picture) Please make it simple

Please help me
Im using MATLAB Program
The output needs to look like the boxes in the (1st and 2nd picture)
Please make it simple and easy thanks
I started the code (3rd picture)
image text in transcribed
image text in transcribed
image text in transcribed
3. Write a program that prompts the user for a vector length. If a valid (greater than or equal to 2) number was entered, the main program should . prompt the user for a minimum value and a maximum value . generate a vector of the specified length of random numbers between the specified minimum and maximum call the function print vector that takes in a vector and its length and uses a for loop to print the vector . prompt the user for the index of the element in the vector to remove . if a valid index was entered, call the function remove element that D takes in a vector, its length, and the index of the element to remove D uses for loops to create a new vector that is the same as the input vector but with the specified element removed b returns the new vector call the function print vector, passing in the new vector and its length If an invalid length was entered, an error message should be displayed. If an invalid index was entered, an error message should be displayed. Sample output Enter the vector length: 10 Enter the nininan value: -5 Enter the saxisu value: 5 The randon vector is: -1.994 4.951 3.343 -2.176 -3.987 2.256 4.887 2.503 .421 1.721 Enter the index of the value to resove: 4 The neu vector is: -1.994 4.951 3.343 -3.987 2.256 4.887 2.503 1-421 1.721 Enter the vector length: -10 Invalid length -1o 3. Write a program that prompts the user for a vector length. If a valid (greater than or equal to 2) number was entered, the main program should . prompt the user for a minimum value and a maximum value . generate a vector of the specified length of random numbers between the specified minimum and maximum call the function print vector that takes in a vector and its length and uses a for loop to print the vector . prompt the user for the index of the element in the vector to remove . if a valid index was entered, call the function remove element that D takes in a vector, its length, and the index of the element to remove D uses for loops to create a new vector that is the same as the input vector but with the specified element removed b returns the new vector call the function print vector, passing in the new vector and its length If an invalid length was entered, an error message should be displayed. If an invalid index was entered, an error message should be displayed. Sample output Enter the vector length: 10 Enter the nininan value: -5 Enter the saxisu value: 5 The randon vector is: -1.994 4.951 3.343 -2.176 -3.987 2.256 4.887 2.503 .421 1.721 Enter the index of the value to resove: 4 The neu vector is: -1.994 4.951 3.343 -3.987 2.256 4.887 2.503 1-421 1.721 Enter the vector length: -10 Invalid length -1o

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle Databases On The Web Learn To Create Web Pages That Interface With Database Engines

Authors: Robert Papaj, Donald Burleson

11th Edition

1576100995, 978-1576100998

More Books

Students also viewed these Databases questions

Question

Q: Please describe your organisations HR department.

Answered: 1 week ago