Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

hi

1 vue (au cours des 30 derniers jours)
abdulhadi khalifa
abdulhadi khalifa le 13 Avr 2012
Clôturé : MATLAB Answer Bot le 20 Août 2021
Sav 0.225 0.30 0.35 0.40 0.45 0.475
Qi 0.251 0.90 2.02 3.63 7.2 9.800
If I have to find Fraction flow "Fo"=dSav/dQi the answer are
Fo 0.1127 0.0525 0.038 0.025 0.0112 0.00778
How can I get the answer?
  1 commentaire
laurie
laurie le 13 Avr 2012
sorry i feel stupid but how can you get 55columns in Fo if you are using dSav =(Sav(n)-Sav(n-1)) and dQi =(Qi(n)-Qi(n-1))? should it be 5 colums instead ?
then you can use something like Fo=dSav ./ dQi (adding . before an operator allows you to make that operation element by element in vectors)

Réponses (1)

Thomas
Thomas le 13 Avr 2012
Sav=[0.225 0.3 0.35 0.4 0.45 0.475 ]
Qi=[0.251 0.90 2.02 3.63 7.2 9.8 ]
Fo=diff(Sav)./diff(Qi)
you can only get 5 values in Fo since you are taking the difference between adjacent values ,. output will have n-1 values..
  2 commentaires
abdulhadi khalifa
abdulhadi khalifa le 13 Avr 2012
I could not get the same answer "0.1127 0.0525 0.038 0.025 0.0112 0.00778 " I got this "0.1156 0.0446 0.0311 0.0140 0.0096"for me I do not need the solution for first point
Thomas
Thomas le 13 Avr 2012
Then your data set is not necessarily the same ( you might have more digits of precision, though that should not change the answer too much..). MATLAB cannot give different solutions with the same date and same code (unless you have a random number generator in between changing random seeds..)

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by