Borrar filtros
Borrar filtros

Re-write the following code so that it avoids using a loop. N = 10; a = zeros(1, N); b = zeros(1, N); for i = 1:N a(i) = i; b(i) = a(i) * a(i); end

2 visualizaciones (últimos 30 días)
  1. Re-write the following code so that it avoids using a loop.
N = 10;
a = zeros(1, N);
b = zeros(1, N);
for i = 1:N
a(i) = i;
b(i) = a(i) * a(i);
end
  4 comentarios

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre Problem-Based Optimization Setup en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by