Find maximum and minimum values of given elements

Assignment Help MATLAB Programming
Reference no: EM131026995

Find Maximum and Minimum values of Given Elements Using MATLAB

Problem:

For the following, write the commands in a script file leaving the semi-colon off so the answers print in the command window. Turn in the script and output. Output should include:

a. number of elements in ts1

b. number of elements in ts2

c. first element in ts1

d. first element in ts2

e. sum of ts1

f. minimum value in ts1

g. mean of ts1

h. first element in tsRev

i. last element in tsRev

Create a script that first creates two variables, ts1 and ts2. Use linspace to create ts1 and the : operator to create ts2.

Both ts1 and ts2 should start at 0 and end at 1, and have (approximately) 100 elements.
Check that the number of elements is approximately correct using the command length on both variables
Check that the first element of each array is, indeed, zero, by accessing the first element using the ts(1) syntax.
Check that the last element of each array is, indeed, 1, by accessing the last element of each array
Hint: What do you put in the () to get the last element?
Calculate the sum, min and average (mean) of the ts1 array
What should the min value be?
What should the mean value be?
Use linspace to create an array tsRev that has the same values as ts1, but in reverse order.
Check the first and last values of tsRev.

Additional Information

This problem related to MATLAB software and discusses about application of MATLAB in mathematics to find out the maximum and minimum values in a group of given elements.

Reference no: EM131026995

Questions Cloud

Marketing practices due to a change in morals over time : Describe an example of where business ethics have changed in regards to marketing practices due to a change in morals over time.
Differences in strategy formulation-strategy implementation : Identify and briefly discuss three differences between strategy formulation and strategy implementation?
Disadvantages of a divisional organizational structure : What are the advantages and disadvantages of a divisional organizational structure?
About setting up a human source collection network : Discuss how you would go about setting up a human source collection network in the company for whom you currently work. What would the strengths and weaknesses of it be? What roadblocks do you think you would encounter and how would you overcome them..
Find maximum and minimum values of given elements : Create a script that first creates two variables, ts1 and ts2 -  Find Maximum and Minimum values of Given Elements Using MATLAB
Essay-exploring ancient mysteries : Choose one (1) of the topics below and develop a three to four (3-4) paragraph essay (of at least 250-550 words) which adequately address the topic you have chosen.
Write a matlab program to analyze a patients ecg signal : Determine the Heart Rate of an ECG Recording of Unknown properties Using MATLAB - Write a MATLAB program to analyze a patient's ECG signal and provide warnings if the heart rate becomes either dangerously low or dangerously high.
State how many complex and real zeros the functon has : find all of the zeros and write a linear factorization of the function
What is a prime data : Define "prime date" to be a date during the year where both the months (as a number, i.e. January is 1, February is 2, etc) and the day are both prime numbers. What is the average number of prime dates per week in one year?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Why does matlab keep telling that you need input arguments

how do you solve this problem and why does MATLAB keep telling that you need more input arguments - Create a function that returns true if the input is a numeric array and false otherwise

  Design a controller which regulates flow

Design a controller which regulates flow and compensate pressure to my desire value in simscape.

  Develop matlab function for the fixed-point method

Develop your own Matlab function for the Fixed-point method. Use the estimated relative error as your stopping criterion. The first line of your function should be function

  Find the mean value and standard deviation of total gravity

plot the total gravity effect of the 5 cylinders by summing their effects at each observation point on the profile.   What is the mean value and standard deviation of the total gravity effect

  Write a matlab script that solves ode

Write a matlab script that solves ODE: y' = 4/(1+x^2) using forward Euler's, improved Euler, classical Runge-Kutta, and Adams-Bashforth methods.

  Plot the open loop displacement response of the

a farm equipment manufacturer has a need to actively reduce the vibration of the operators seat using an electrodynamic

  Write a function named ''read_line''

Verify that your code works by saving some text into a file (created in notepad / textedit) and saving the file with extension '.txt'. You should attach the file (call it 'test.txt') with your code.

  The system is released from rest with the angle theta 90

the system is released from rest with the angle theta 90 degrees. determine theta dot when theta reaches 60 degrees.

  Jacobian needed for newtons method

Write a Sci/Matlab function that returns the function values and the Jacobian needed for Newton's method .

  Calculate the distance between cities

Calculate the distance between cities

  Give examples of appropriate values

Give examples of appropriate values for each of the following type expressions. Do not use the empty list as the value for any list component

  Program that prompts the user to enter grades in a loop

Write a main program that prompts the user to enter grades in a loop, ending on a negative number, stores the grades in a vector, and asks the user for a passing grade. Ten pass the grade vector and passing cutoff to the function and print the per..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd