Vectorise an n dimensional raise to the power loop
Mostrar comentarios más antiguos
I am looking for the fastest way to compute the following
x = rand(1,1000);
for j = 1:m
for j = 1:n %etc.
phi(i,j,...) = ((x).^i).^j; %etc.
end
end
I have been looking at the bsxfun tool but it is restricted to a one-dimensional output.
Help would be gratefully appreciated, cheers.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre MATLAB 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!