I need to setup an M-file called nmoles that requires two vector inputs - the mass (m) and molecular weight (MW) - and returns the corresponding number of moles.
n = m/MW
can anyone help me please! thanks
I think that was what i was looking for. Now i need to show the MW in a 10 x 3 matrix for 3 different compounds (benzene = 78.115g/mol, ethyl alcohol = 46.07 g/mol, and r134a = 102.3 g/mol).
I only know how to put make it a 1 x 10 matrix.
ex. nmoles (1:10, 78.115), nmoles (1:10, 46.07), nmoles (1:10. 102.3).
I tried the following in Matlab:
Benzene = nmoles (1:10, 78.115);
Ethyl_Alcohol = nmoles (1:10, 46.07);
R134a = nmoles (1:10, 102.3);
x = [Benzene', Ethyl_Alcohol', R134a']
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
Does this seem like the correct code?
Also, it is asking to put the function in meshgrid...no clue here, any suggestions?