Borrar filtros
Borrar filtros

difference result with same equation

1 visualización (últimos 30 días)
vaya putra
vaya putra el 19 de Jul. de 2018
Respondida: vaya putra el 19 de Jul. de 2018
my commands
bhp=100*ones(10,1);
bht=[500;500;500;500;500;300;300;300;300;300];
p= @(bhp,bhT) bhp + g*dz.*rho(bhp,bhT);
tried to validation p(bhp,bhT).*bhp + g*dz.*rho(bhp,bhT)
result ans =
1.0e+09 *
-2.2263
-2.2263
-2.2263
-2.2263
-2.2263
-4.7130
-4.7130
-4.7130
-4.7130
-4.7130
how can be i got difference result if i assume a=g*dz.*rho(bhp,bhT); a =
1.0e+07 *
-2.2042
-2.2042
-2.2042
-2.2042
-2.2042
-4.6664
-4.6664
-4.6664
-4.6664
-4.6664
b=bhp;
c=a+b
result
c =
1.0e+07 *
-2.2042
-2.2042
-2.2042
-2.2042
-2.2042
-4.6664
-4.6664
-4.6664
-4.6664
-4.6664
anyone can help me?
  1 comentario
Aquatris
Aquatris el 19 de Jul. de 2018
Editada: Aquatris el 19 de Jul. de 2018
because at the top results you are evaluating
p(bhp,bhT).*bhp + g*dz.*rho(bhp,bhT)
and at the bottom
bhp + g*dz.*rho(bhp,bhT)
This can further be proved by looking at the results and seeing the relation
100*(bottom results)+a = (top results)
Also your code is missing g and rho, maybe other variables aswell for me to run it on my Matlab to further help.

Iniciar sesión para comentar.

Respuestas (2)

vaya putra
vaya putra el 19 de Jul. de 2018
thank you very much, i understand

vaya putra
vaya putra el 19 de Jul. de 2018
actually i want calculate this equation,
that why i define by my self bhp and bhT, ho to prove aot calculate bhp,bhT if i get value (bhp and bhT)
p = @(bhp,bhT) bhp + g*dz.*rho(bhp,bhT);

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by