Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
function with vectors to calculate chemical concentration
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
David Hill
le 5 Avr 2021
Show us the code that you currently have including inputs and expected output. Ask a specific question.
Réponses (0)
Cette question est clôturée.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!