Info
This question is closed. Reopen it to edit or answer.
function with vectors to calculate chemical concentration
2 views (last 30 days)
Show older comments
Hi, I need some help with the a function that I need to write for a chemical exercise.
It has to be a function that calculates the concentration of the different elements depending on the time.
The function gets 4 parameters : starting_concentration, k1, k2, derivative and it returns the vectors of the different concentrations.
Two chemical reactions are given, the strating_concentration k1 and k2 are also given.
I have to define zero vectors which will include the concentration of each element of the reactions.
Each element of the vectors represents the concentration at a specific time (the vectors’ size is the number of times that we check).
Then I need to write a loop for each time t in order to calculate the difference between the previous and the current concentrations.
The codes that I already tried didn’t work at all and I am still a beginner so I would really appreciate your help and ideas.
Thanks in advance :)
1 Comment
David Hill
on 5 Apr 2021
Show us the code that you currently have including inputs and expected output. Ask a specific question.
Answers (0)
This question is closed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!