Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with multiple input vectors and a single output vector. 1. z(x, y) = x + y 2. z (a, b, c) = abe 3. z (w, x, y) = we(x/y) 4. z (p, t) = p/sin(t) Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with single input vector and a multiple output vectors. 5. f(x) = cos(x), f(x) = sin(x) 6. f(x) = 5x+2, f(x) = (5x+2)/2 7. f(x) = exp(x), f(x) = ln(x) Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with multiple input vectors and a multiple output vectors. 8. f(x, y) = x + y, f(x, y) = x - y 9. f(x, y) = yex, f(x, y) = xey 6789 UN MASS7 9 10 11 L2 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 10 1 12 13 14 15 16 17 18 19 50 51 52 53 54 0 %% Prroblem 6.2 %1. function r1-z(x,y) r1=x+y; end %2. function r2=z2(a,b,c) t1=b.^c; r2 =a. *t1; end %3. function r3=z3 (w, x,y) t1=x. /y; t2=exp(t1); r3=w. *t2; end %4. function r4=z4(p,t) t1=sin(t); r4=p./t1; end %5. function [x, y]=f5(t) x=cos (t); y=sin(t); end %6. function [x, y] =f6(t) x=( 5.*t. ^2)+2; y=sqrt(x); end %7. function [x, y]=f7(t) x=exp(t); y=log(t); end %8. function [x1, y1]=f8(x,y) x1=x+y; y1=x-y; end %9. function [x2,y2]=f9(x,y) t1=exp(x); t2 =exp(y); x2=y. *t1; y2=x. *t2; end Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with multiple input vectors and a single output vector. 1. z(x, y) = x + y 2. z (a, b, c) = abe 3. z (w, x, y) = we(x/y) 4. z (p, t) = p/sin(t) Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with single input vector and a multiple output vectors. 5. f(x) = cos(x), f(x) = sin(x) 6. f(x) = 5x+2, f(x) = (5x+2)/2 7. f(x) = exp(x), f(x) = ln(x) Assuming that the matrix dimensions agree, create, and test MATLAB functions to evaluate the following simple mathematical functions with multiple input vectors and a multiple output vectors. 8. f(x, y) = x + y, f(x, y) = x - y 9. f(x, y) = yex, f(x, y) = xey 6789 UN MASS7 9 10 11 L2 13 14 15 16 17 18 19 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 10 1 12 13 14 15 16 17 18 19 50 51 52 53 54 0 %% Prroblem 6.2 %1. function r1-z(x,y) r1=x+y; end %2. function r2=z2(a,b,c) t1=b.^c; r2 =a. *t1; end %3. function r3=z3 (w, x,y) t1=x. /y; t2=exp(t1); r3=w. *t2; end %4. function r4=z4(p,t) t1=sin(t); r4=p./t1; end %5. function [x, y]=f5(t) x=cos (t); y=sin(t); end %6. function [x, y] =f6(t) x=( 5.*t. ^2)+2; y=sqrt(x); end %7. function [x, y]=f7(t) x=exp(t); y=log(t); end %8. function [x1, y1]=f8(x,y) x1=x+y; y1=x-y; end %9. function [x2,y2]=f9(x,y) t1=exp(x); t2 =exp(y); x2=y. *t1; y2=x. *t2; end
Expert Answer:
Related Book For
Probability and Stochastic Processes A Friendly Introduction for Electrical and Computer Engineers
ISBN: 978-1118324561
3rd edition
Authors: Roy D. Yates, David J. Goodman
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
Two stocks, A and B, have beta coefficients of 0.8 and 1.4, respectively. If the expected return on the market is 10 percent and the risk-free rate is 5 percent, what is the risk premium associated...
-
Section A lists a number of reporting requirements for colleges and universities. Section B lists the standard-setting body(ies) imposing the reporting requirements. Section A ____ 1. Patents are...
-
Explore the concept of advanced adaptive structures, incorporating technologies such as smart materials, actuators, and control systems, and discuss their potential applications in creating...
-
What is a writ of execution?
-
Rod Clooney purchases Agnes Mitchell's sole proprietorship for $990,000 on August 15, 2014. The assets of the business are as follows: Rod and Agnes agree that $50,000 of the purchase price is for...
-
For each transaction, determine the impact-increase, decrease, or no effect-on tofal assets, total liabilities, and total equity. Total Assets Total Liabilities Total Equity Transcations Issued...
-
A small package is deposited by the conveyor belt onto the 30 ramp at A with a velocity of 0.8 m /s. Calculate the distance s on the level surface BC at which the package comes to rest. The...
-
Discuss origin of spectral lines in different orbitals. Also write a note on different spectral series.
-
A project that will provde annual cash flows of $3,000 for nine years costs $10,000 today. a. At a required return of 10 percent, what is the NPV of the project? b. At a required return of 28...
-
Why you should stir Calculate the time it takes for glucose, initially concentrated at a point, to spread out so that the rms-average distance traveled by the glucose molecules is 1 cm ( = 6.7 1010...
-
b) What kinds of heuristics do humans use to think through complex problems? Give three examples of heuristics and how they each affect judgment. c) If you are trying to elicit an expert's judgment...
-
1. Gas Absorbtion in a Falling Liquid Film: Gas absorbers are im- portant technologies for flue-gas cleanup, and have potential for direct air capture of CO2. Both applications can mitigate climate...
-
The spot price of an index is 1100, the continuously compounded risk-free rate is 5% per year, and the continuous dividend yield on the index is 2%. [a] Suppose you observe a 6-month forward price of...
-
Question 22 Which of the following statements about a binary tree is correct? Every binary tree is either complete or full Every complete binary tree is also a full binary tree Every full binary tree...
-
An environmentalist wants to determine if the median amount of potassium (mg/L) in rainwater in Lincoln County, Nebraska, is different from that in the rainwater in Clarendon County, South Carolina....
-
Suppose Dagwood (Blondie's husband) wants to eat a sandwich but needs to go on a diet. Dagwood decides to let the flip of a coin determine whether he eats. Using an unbiased coin, Dagwood will...
-
Suppose that for the general population, 1 in 5000 people carries the human immunodeficiency virus (HIV). A test for the presence of HIV yields either a positive (+) or negative (-) response. Suppose...
-
At a casino, the only game is numberless roulette. On a spin of the wheel, the ball lands in a space with color red (r), green (g), or black (b). The wheel has 19 red spaces, 19 green spaces and 2...
-
Use data from Appendix \(C\) to choose points from the performance curves for a Peerless horizontal split case Type 16A18B pump at 705 and 880 nominal rpm. Obtain and plot curve-fits of total head...
-
An axial-flow fan operates in sea-level air at \(1350 \mathrm{rpm}\) and has a blade tip diameter of \(3 \mathrm{ft}\) and a root diameter of \(2.5 \mathrm{ft}\). The inlet angles are...
-
Data from tests of a water suction pump operated at \(2000 \mathrm{rpm}\) with a 12 -in.-diameter impeller are Plot the performance curves for this pump; include a curve of efficiency versus volume...
Study smarter with the SolutionInn App