Could anyone please explain this matlab code...?
Mostrar comentarios más antiguos
function g = NeumannBoundCond(f)
[nrow,ncol] = size(f);
g = f;
g([1 nrow],[1 ncol]) = g([3 nrow-2],[3 ncol-2]);
g([1 nrow],2:end-1) = g([3 nrow-2],2:end-1);
g(2:end-1,[1 ncol]) = g(2:end-1,[3 ncol-2]);
1 comentario
dpb
el 20 de Mzo. de 2014
Format code so it's legible...
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 20 de Mzo. de 2014
In general, the form
array([A B], C)
refers to selecting the elements of the array in which the row is A or B, and the column is any of the values given by C. So (A,C(1)), (A,C(2)), (A,C(3))... (B,C(1)), (B,C(2)), ...
With A, B, C, D all scalar, array([A B], [C D]) would designate four locations, (A,C), (A,D), (B,C), (B,D)
Categorías
Más información sobre Deep Learning Toolbox 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!