In: Mechanical Engineering
Write a MATLAB assignment statement for each of the following functions, assuming that w, x, y, and z are row vectors of equal length and that c and d are scalars.
Write a MATLAB code for the expression,
f = 1/√2πc/x
Let the scalar value be c=5.
And vector can be defined as given below in MATLAB program.
c=5;
x=0:10 % x is vector of numbers between 0 and 10
f = 1./sqrt(2*pi*c./x)
Write a MATLAB code for the expression,
E = {(x + w)/(y + z)}/{(x + w)/(y – z)}
The vectors can be defined as given below in MATLAB program.
w = 0:10;
x = 0:10;
y = 0:10;
z = 0:10;
% let w, x, y, and z are vectors of numbers between 0 and 10
% w, x, y, and z are vectors of equal length.
E = ((x + w)./(y + z))./((x + w)./(y - z))
Write a MATLAB code for the expression,
A = e-x/2x/(lny)√dz
Let the scalars value be c = 5, and d = 7.
And vectors can be defined as given below in MATLAB program.
c = 5;
d = 7;
w = 0:10;
x = 0:10;
y = 0:10;
z = 0:10;
% let w, x, y, and z are vectors of numbers between 0 and 10
% w, x, y, and z are vectors of equal length.
A = exp(-c./(2.*x))./(log(y).*sqrt(d.*z))
Write a MATLAB code for the expression,
S = x(2.15 + 0.35y)1.8/z(1 – x)y
The vectors can be defined as given below in MATLAB program.
w = 0:10;
x = 0:10;
y = 0:10;
z = 0:10;
% let w, x, y, and z are vectors of numbers between 0 and 10
% w, x, y, and z are vectors of equal length.
S = (x.*(2.15 + (0.35).*y).^(1.8))./(z.*(1-x).^y)
Write a MATLAB code for the expression,
f = 1/√2πc/x