Urgent Help with Iterating Vectors on MATLAB
Información
La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.
Mostrar comentarios más antiguos
Hi
I've been trying to carry out the following procedure:
a) Set vector v to be the vector [1 ; 0]
b) Find a new vector u = Av (where A is a generalised 2 x 2 real matrix)
c) Find the magnitude of this new vector u, and call this magnitude c
d) Divide u by c (i.e. to make it into a unit vector)
e) Set v to be this unit vector, then repeat steps b) to e) a numnber of times
So far I have tried inputting this:
v(1) = [1 ; 0]
for n = 1:100
u(n) = A*v(n+1)
c(n) = norm(u(n))
v(n+1) = u(n)/c(n)
end
but to no avail! I don't know what to do! Help please?
Respuestas (1)
Sean de Wolski
el 25 de Abr. de 2013
well first off,
v(1) = [1; 0];
This attempts to stick two elements (a 1 and a 0) into one spot (v(1)). So this won't work.
La pregunta está cerrada.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!