Using built-in functions to manipulate MATLAB variables. define the following ve
ID: 3788244 • Letter: U
Question
Using built-in functions to manipulate MATLAB variables. define the following vector: v = what is the max and minimum value of the above vector? In what elements are these values found? find the squareroot , cube root and 7^th root of this vector using a single operation. what is the length of the vector? How many elements does it have? (you must use MATLAB to determine/prove this) Replace the max value of the vector with a value 8.1x its size without redefining the entire vector. Do the same with the minimum value. create a new, unique, vector containing the 3^rd, 7^th and last values of the vector in (a). define a vector from 0 to 10 with 100 equally spaced entries define a vector ranging from 110 to 120 with a step size of 0.1. What is the length of the resulting vector? evaluate the trigonometric functions sin and cos from 0 to 2 pi radians in steps of 0.1. consider the following vector: define this vector in matlab for a user-selected value of x. Find a MATLAB function that will sum the entries of this vector together. Compare your answer to MATLAB's exp(x) for the same value of x. Are your answers reasonably close? What does the built-in function you found appear to do? define a random 100 x 1 vector (be sure to suppress the output). What are the mean, median and mode? Understanding MATLAB matrices. define the following matrices in MATLAB: (problems a - g) A = [6 5 1 12 2 0]Explanation / Answer
>>v=[sqrt915),13,7^2,sqrt(54,89.2,0.541,e^(7/8),10,log 10(34.2)] <enter> % definig vector v
>>max_value = max(v) <enter> % return the maxvalue of the vector v
>>min_value =min(v) <enter> % return the minvalue of the vector v
>>indexOfMaxValue = find(v==max(v))<enter> % return the index of maxvalue of the vector v
>>indexOfMinValue = find(v==min(v))<enter> % return the index of minvalue of the vector v
>>Y2 = nthroot(v ,2) <enter> % return the sqrt root of the vector v
>>Y3 = nthroot(v ,3) <enter> % return the cube root of the vector v
>>Y3 = nthroot(v ,7) <enter> % return the 7th root of the vector v
>>length (v) <enter> % return the length of the vector v
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.