Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Would you please solve this Matlab practice assignment, all I need are very simp

ID: 3571916 • Letter: W

Question

Would you please solve this Matlab practice assignment, all I need are very simple inputs for #27 and #28. Thank you for your help, Chegg has been incredibly invalueable this semester.

ENGR 215 MATLAB for Engineering Fall 2016 27 (8 pts) Consider the formula: n m Mw where n is the number of moles of a substance m is the mass of the substance MW is the molecular weight (molar mass) of the substance a) Create a function m-file called nmoles that requires 2 vector inputs the mass and molecular weight and returns the corresponding number of moles. (You are providing vector input, hence function meshgrid is necessary in your calculations also this function's m file should be a separate one from the main program) b) Test your function for the following compounds, for masses from 1 to 10 g: benzene, with a molar mass of 78.115 g/mol ethyl alcohol, with a molar mass of 46.07 g/mol tetrafluoroethane. with a molar mass of 102.3 g/mol (Your result should be a 10x3 matrix.) 28. (8 pts) create a function called launch (show that separately) that takes an input argument from main program that is a range of time of 0 to 22 seconds with an increment of 2 seconds The function has one output argument that is a table that consists of time and y call this function from the main program of this quiz Initialize variables for the initial velocity, vo 108, and gravity g 9.81 in your function and use in the general formula below All the units are metric so don't worry about units General formula: y m vot gt

Explanation / Answer

B)

Benzene = nmoles (1:10,78.115);

Ethyl _Alochol = nmoles (1:10,46.07); /* this how the matrix 1X10 format */

Tetra = nmoles (1:10, 102.3);

x = [Benzene, Ethyl_alcohol, Tetra]

finally it looks like this

x=

0.0128 0.0217 0.0098

0.0256 0.0434 0.0196

0.0384 0.0651 0.0293

0.0512 0.0868 0.0391

0.0640 0.1085 0.0489

0.0768 0.1302 0.0587

0.0896 0.1519 0.0684

0.1024 0.1736 0.0782

0.1152 0.1954 0.0880

0.1280 0.2171 0.0978

A) The normal form of a function .m file looks like this

function n=nmoles(m, MW)

n=.......;

but now in our code we use like this

function n=nmoles(1,1)

n=......;

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote