Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

What's the fastest way to program a matrix recursion in matlab?

1 visualización (últimos 30 días)
Rosi Marungu
Rosi Marungu el 12 de Nov. de 2015
Cerrada: Walter Roberson el 13 de Nov. de 2015
The matrix-recursion of the n by n matrices Y_t looks like this:
<<chart-googleapis-com-chart-cht-tx-chl-Y_-t--A-20-2B-20--sum_-i-1---p--20B_-i-Y_-t-i.>>
A and B are given.
This is my attempt, but it runs slowly:
Y = zeros(n,n,T); %Going to fill the 3rd dimension for Y_t, t=1:T
Y(:,:,1:p) = initializingY
for t=(p+1):T
Y(:,:,t) = A;
for i=1:p
Y(:,:,t) = Y(:,:,t) + B(:,:,i)*Y(:,:,t-i);
end
end
Can you think of a more efficient way to do this?

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by