Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in matlab please! Question 1: Implement the following algorithm in a script file. Save the script file as lastnameChallengeA3Q1. a. Ask the user to enter

in matlab please!
image text in transcribed
Question 1: Implement the following algorithm in a script file. Save the script file as lastnameChallengeA3Q1. a. Ask the user to enter a column vector of any size. b. Calculate the mean of the values of the column vector c. Display the mean of the values. Question 2: Implement the following algorithm in a script file. Save the script file as lastnameChallengeA 3Q2. a. Ask the user to enter a column vector of any size. b. Use a for loop to calculate the square of all values and store them in a new vector, one value at a time. Make sure to preallocate the variable for speed. c. Display the squared vector. Question 3: Implement the following algorithm in a script file. Save the script file as lastnameChallengeA 3Q3. a. Define two column vectors using the randi function. Name the vectors, vecl and vec2. The values of the elements in the vectors should be between 1 and 50 . b. Calculate the mean of the each of the vectors and store them in separate variables. c. Compare the means of the two vectors. If the mean of vector 1 is greater than mean of vector2, display: mean of vector 1 is greater than mean of vector 2. Similarly, If the mean of vector 2 is greater than mean of vectorl, display: mean of vector 2 is greater than mean of vector 1

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

Students also viewed these Databases questions