Borrar filtros
Borrar filtros

Info

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

MATLAB help with using nested loops in matricies

2 visualizaciones (últimos 30 días)
Blake Sewell
Blake Sewell el 1 de Sept. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Ok I'm posting a second time as I was informed on my last post that I need to show my attempt of coding towards the part to recieve help. In part 3 of my workshop assignment, I've gotten as far as to get the first 10 rows in a z=zeros(20,10) but I am unsure on what to do to get the remaining 10 rows at the bottom as they all still display zeros.
My code is as follows:
z=zeros(20,10);
for x = 1:10
for y=1:10
z(x,y)=2*x+y^2;
end
end
disp(z)
and this is what it looks like when I click run:

Respuestas (1)

Fangjun Jiang
Fangjun Jiang el 1 de Sept. de 2020
for x = 1:size(z,1)

La pregunta está cerrada.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by