Question

In: Mechanical Engineering

Use MATLAB to create a vector x having six values between 0 and 10 (including the endpoints 0 and 10

Use MATLAB to create a vector x having six values between 0 and 10 (including the endpoints 0 and 10). Create an array A whose rst row contains the values 3x and whose second row contains the values 5x - 20.

 

 

Solutions

Expert Solution

We are required to create a vector x having six values between 0 and 10. A very useful MATLAB command to create the uniformly distributed array when the end points and length of array is known is linspace(a, b, n)

Here,

 

a is the starting point

b is the end point

n is the number of elements required

 

We also need to create an array A whose first and second row are to be obtained using the vector x.

 

A MATLAB program to create the above vector x and array is shown below:

 


We are required to create a vector x having six values between 0 and 10. A very useful MATLAB command

Related Solutions

Use Matlab to introduce arow vector,f,and define it as a 1 by 4 vector showing values...
Use Matlab to introduce arow vector,f,and define it as a 1 by 4 vector showing values of 1, 2, 3and 4. Now try to build matrix D, using the following 2 commands a.D = [f ; A] b.D= [f , A] c.Which one can be built,and which one cannot be built? Explain your answer. Matrix A, which is a 4by 4 matrix, (The first, second, third and fourth column values are:2,4,6,8and 1,3,5,7 and 8,6,4,2 and 7,5,3,1 , respectively.
Solve the system below having the initial values x(0) = 1 = y(0) x’ = x...
Solve the system below having the initial values x(0) = 1 = y(0) x’ = x + 2y y’ = -5x + 3y Please use solving systems of linear des by elimination. Thank You
For all of the graphs below use a vector x ranging from 0 to 10 in steps of 0.1.
For all of the graphs below use a vector x ranging from 0 to 10 in steps of 0.1. Create two additional vectors using the following formulas: yp=x.^2.5 and ym=x.^(-2.5);[1;2] Create the formula for the derivative of yp (apply the rules of calculus to the formula for yp). Plot yp versus x. Add a straight line at 3 points (at x = 3, 5, 8) with the slope of the line (determined from the derivative) showing that the derivative is...
Write the line x = 0:2:20; in the Command Window of MATLAB and then create a...
Write the line x = 0:2:20; in the Command Window of MATLAB and then create a Simulink model that first loads x from the Workspace, then creates a vector y such that y = 2.5x + ex , and finally sends the vector y back to the Workspace. You will need a From Workspace block, a To Workspace block, two Constant blocks, a Product block, and a Sum block. Note that there is a sample time associated with the From...
matlab Q1) a) create a vector that starts at a, ends at b, and has a...
matlab Q1) a) create a vector that starts at a, ends at b, and has a spacing of c (allow the user to input all of these parameters) b)create an inches vector using a,b and c c) calculate the corresponding values of feet in another vector (1feet=12 inches) d) group the inch vector and the feet vector together into a table matrix e)use the disp command to create a title for a table that converts inches to feet f)use the...
Create a vector of assumed probabilities and use it to obtain and display a vector of expected values, then check that the assumptions required for this test are satisfied.
  Goodness of Fit Microhabitat factors associated with forage and bed sites of barking deer in Hainan Island, China, were examined. The sample of 477 examined sites where the deer forage were categorized by habitat as follows: Habitat Woods Cultivated grassplots Deciduous forests Other Deer forage sites 15 16 50 386 In this region, woods make up 4.8% of the land, cultivated grassplots make up 14.7%, and deciduous forests make up 39.6%.Do these data provide convincing evidence that barking deer...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). A)use Jacobi...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). A)use Jacobi iteration. B) use Gauss-siedel iteration. 1) make sure to use SOR with w=1.25, w=1.5, w=1.75,w=1.9, and optimal value if given. * A=[1,-2,0,0;-2,5,-1,0;0,-1,2,-0.5;0,0,-0.5,1.25]] , B=[-3;5;2;3.5]. , (optimal w is 1.5431.)
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). B) use...
Use ten iterations of the appropriate MATLAB function, with x^(0)=[0,...,0]', to solve Ax=b (approximately). B) use Gauss-siedel iteration. C)use SOR with w=1.25, w=1.5, w=1.75,w=1.9, and optimal value if given. * A=[4,8,0,0;8,18,2,0;0,2,5,1.5;0,0,1.5,1.75] , B=[8;18;0.5;-1.75]. , (optimal w is 1.634.)
Use matlab to plot Taylor approximation for f(x) for x near 0 Given f(x) = exp(x)...
Use matlab to plot Taylor approximation for f(x) for x near 0 Given f(x) = exp(x) Use subpots to plot and its absolute and realative erros for N= 1,2,3 PLease give matlab code for Taylor and explain in detail, Thank you
MATLAB. A three vector force system has forces as outlined, use a three element vector to...
MATLAB. A three vector force system has forces as outlined, use a three element vector to represent the x, y, and z terms respectively, F = [x_value, y_value, z_value]. Find the resultant force when: F1 has a magnitude of 120 N and is in the x-y plane, 35 degrees BELOW the positive x axis, F2 has a magnitude of 810 N and is in the x-z plane, 100 degrees ABOVE the positive x axis, and F3 has a magnitude of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT