Step size increment?
14 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Angela Mehta
el 13 de Jul. de 2020
Comentada: Walter Roberson
el 13 de Jul. de 2020
Hello! I am new to Matlab and this might be a very simple question but please try and help me out!
So basically, I have both initial value(k0) and w(k0), where w is a function of k. Now we can step to k1 = k0 + dk and we will have to use w(k0) as the initial guess to find w(k1) then, k2 = k1 + dk and w(k2) can be found from w(k1) so on.
I have set k as the following;
k0 = 1/2;
w(k0) = 1.4;
k= linspace(1/2, 2/3, 101);
I would like find w(k).
Thank you very much!
2 comentarios
Image Analyst
el 13 de Jul. de 2020
What is the formula for w(k)? Or how does w(k+1) depend on w(k), the prior element?
Angela Mehta
el 13 de Jul. de 2020
Editada: Angela Mehta
el 13 de Jul. de 2020
Respuesta aceptada
Walter Roberson
el 13 de Jul. de 2020
Editada: Walter Roberson
el 13 de Jul. de 2020
k = linspace(1/2, 2/3, 101);
w = zeros(size(k));
w(k(1)) = 1.4;
for idx = 2 : numel(k)
w(idx) = function_to_find_w_k(k(idx), w(idx-1));
end
2 comentarios
Angela Mehta
el 13 de Jul. de 2020
Editada: Angela Mehta
el 13 de Jul. de 2020
Walter Roberson
el 13 de Jul. de 2020
k = linspace(1/2, 2/3, 101);
w = zeros(size(k));
w(1) = 1.4;
for idx = 2 : numel(k)
w(idx) = function_to_find_w_k(k(idx), w(idx-1));
end
Más respuestas (0)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!