Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please do this using MATLAB, the purpose of the assignment is to understand basic user-defined functions. Thank you so much ahead of time!! 3.Write a
please do this using MATLAB, the purpose of the assignment is to understand basic user-defined functions. Thank you so much ahead of time!!
3.Write a function to calculate the heat of reaction using heats of formation. *The inputs to the function should be: An array (A) containing the number of moles of products. An array (B) containing the heats of formation of each product. (Note: the order of the heats of formation of each product should be the same as the order of number ofmoles of products in the previous array). An array (C) containing the number of moles of reactants. An array (D) containing the heats of formation of each reactant. o o o o The function should check that the lengths of arrays A and B are the same, and that the lengths of arrays C and D are the same. The output of the function will be the heat of reaction. (a) Check your function using the photosynthesis reaction: 6CO2(g) + 6H20(l) C6H13O6(s) + 602 (1) where the heats of formation are: carbon dioxide: water glucose: xVgen 394 kJ/mol 286 kJ/mol 1274 kJ/mol 0 kJ/mol (b) Also test the reaction for the combustion of ethanol: CzHsOH +3 O2 2 CO2 +3 H2OStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started