Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

hi

1 visualizzazione (ultimi 30 giorni)
abdulhadi khalifa
abdulhadi khalifa il 13 Apr 2012
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commento
laurie
laurie il 13 Apr 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)

Risposte (1)

Thomas
Thomas il 13 Apr 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 Commenti
abdulhadi khalifa
abdulhadi khalifa il 13 Apr 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 il 13 Apr 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..)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by