code to do iterations on matlab

have to find a code to do 9 iterations
f1(p1)=561+7.92(p1)+0.00156(p1)^2 $/h
f2(p2)=310+7.85(p2)+.0.00194(p2)^2 $/h
f3(p3)=78+7.97(p3)+0.00482(p3)^2 $/h
Ploss=0.00004(p1)^2+0.00006(p2)^2
inital conditions:
p1=400
p2=300
p3=150

 Respuesta aceptada

Thorsten
Thorsten el 2 de Dic. de 2014
p1=400
p2=300
p3=150
for i=1:9
% place your code here
end

3 comentarios

scott p
scott p el 2 de Dic. de 2014
i have that part thank you i am just confused on how to do the code in the middle do i just put in the functions above?
Thorsten
Thorsten el 3 de Dic. de 2014
Yes.
scott p
scott p el 3 de Dic. de 2014
so far i have this
p1=400;
p2=300;
p3=150;
for i=1:9
g1=.00008*(p1)
g2=.00012*(p2)
f1(p1)=561+7.92*(p1)+0.00156*(p1)^2
f2(p2)=310+7.85*(p2)+0.00194*(p2)^2
f3(p3)=78+7.95*(p3)+0.00006*(p2)^2
end

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre MATLAB en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 2 de Dic. de 2014

Comentada:

el 3 de Dic. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by