Write a Matlab code to perform the following: a) Ask the user to enter a number, and place it in the vector (u). The number of elements in (u) must be 25. b) When the vector (u) is full, tell the user the vector is full. c) Find the maximum and minimum number in the vector (u). d) Replace the elements of odd index in (u) by zero. e) Remove the fifth element in the vector (u).

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter13: Structures
Section: Chapter Questions
Problem 5PP
icon
Related questions
Question
I need the answer as soon as possible
Write a Matlab code to perform the following:
a) Ask the user to enter a number, and place it in the vector (u). The number of elements in (u) must be 25.
b) When the vector (u) is full, tell the user the vector is full.
c) Find the maximum and minimum number in the vector (u).
d) Replace the elements of odd index in (u) by zero.
e) Remove the fifth element in the vector (u).
Transcribed Image Text:Write a Matlab code to perform the following: a) Ask the user to enter a number, and place it in the vector (u). The number of elements in (u) must be 25. b) When the vector (u) is full, tell the user the vector is full. c) Find the maximum and minimum number in the vector (u). d) Replace the elements of odd index in (u) by zero. e) Remove the fifth element in the vector (u).
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr