Borrar filtros
Borrar filtros

Info

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

Extracting matrix's from a loop, with an index number.

1 visualización (últimos 30 días)
Henrik Kristiansen
Henrik Kristiansen el 9 de Oct. de 2019
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hello Matlab forum.
Im total new to this program, but i need to use it for a project in school.
I was wondering if its possible to get the data / matrix's from the loop below, named and indexed so that all the e's would be numbered from 1 - 20 as they are procssed in the loop.
Force=0
for i = 1:20
Force = Force + 1
S = Force/(n*areal)
e = S./Emodul
etot(i,:) = e
end
ive tried different things like e(i+1) or e[i] and i cant figure out how to solve this problem by myself with the help of google.
Hope some of you can help me with this problem.
Thanks in advice :)
  2 comentarios
being_raheel
being_raheel el 9 de Oct. de 2019
It is possible. But first you have to declare the values of other variables also. There has to be at least one arrary with 20 values, either areal, n or Emodul.
Emodul=20;
areal=0:20;
n=5;
Force=0;
for i = 1:20
Force = Force + 1;
S = Force/(n*areal);
e = S./Emodul;
etot(i,:) = e
end
Henrik Kristiansen
Henrik Kristiansen el 9 de Oct. de 2019
sorry, i have declared the values of the other variables, just forgot to write them :)
But how do i make the e go from e1 to e20 with the data printed so i can use it later in the program.

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