Info

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

please, how ( index logical work in matlab ) ?

1 visualización (últimos 30 días)
Dodo
Dodo el 25 de Oct. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
in solvig for example question for f2 (x) function in the range of [-2,5] and so on.

Respuestas (1)

drummer
drummer el 25 de Oct. de 2020
Editada: drummer el 25 de Oct. de 2020
MATLAB does not accept negative indexes if you want to walk through your range. It also starts @ 1.
One workaround you can should be:
idx = -3;
for i = 1 : 7
idx = idx + 1
% then you apply your idx into your f2(idx) down here.
end
Cheers

La pregunta está cerrada.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by