How to half the value of a constant inside an iteration?
Mostrar comentarios más antiguos
I have an iteration loop. Inside the loop, I have a constant gamma. I want its starting value to be 10e-8. I want to half its value on every iteration (10e-4 on second iteration). How to do it?
maxiter = 100;
while iter< maxiter
gamma = 1Oe-8
f = gamma * p;
end
4 comentarios
madhan ravi
el 12 de Feb. de 2019
What's p and what's the desired output ?
OCDER
el 12 de Feb. de 2019
" half its value on every iteration (10e-4 on second iteration) "
This is a confusing statement. Do you want to half it's value?
(10e-8) / 2 = 5e-9
OR
Do you want to increase the power value by half the value?
10e-8 , 10e-4, 10e-2, 10e-1, 10e-0.5 ?
Ahmad Hasnain
el 12 de Feb. de 2019
Ahmad Hasnain
el 12 de Feb. de 2019
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Gamma Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!