Array indexing and processing
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Gilbert S
el 14 de Feb. de 2015
Comentada: Star Strider
el 14 de Feb. de 2015
Hi there,
I was wondering if someone could help explain what the following line of matlab code is doing -
R = H(npt-1:-1:2);
Where H is a vector (or 1 * 513 matrix) of complex numbers.
Thanks for any tips
0 comentarios
Respuesta aceptada
Star Strider
el 14 de Feb. de 2015
That line assigns to ‘R’ values of ‘H’ using index references starting at ‘npt-1’, decrementing by 1 to ‘H(2)’.
For instance:
H = [1:10];
npt = 10;
R = H(npt-1:-1:2)
‘R’ is assigned:
R =
9 8 7 6 5 4 3 2
0 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Performance and Memory 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!