Info

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

Help Needed with looping commands

3 visualizaciones (últimos 30 días)
inteli
inteli el 17 de Sept. de 2020
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
I have two sets of column data (about 120 data points each), d(:,1) and c(:,2).
How do I use the 'for' and 'if' loop commands to evaluate the difference between each of the points in the variables (that is, say E = d - c) and then compare each of the outcome with an error value computed already to produce another column data of results less than the error benchmark.
Thank you.

Respuestas (1)

KSSV
KSSV el 17 de Sept. de 2020
Just use:
E = d(:,1)-c(:,2) ;
You need not to use a loop.
  4 comentarios
inteli
inteli el 17 de Sept. de 2020
Thank you for the reply. Actually, I needed the program to output E and c values at any point/points of detection showing less than the error value.
KSSV
KSSV el 17 de Sept. de 2020
You can do what I have shown above right? Do the comparison, get the logical indices and pick the points.

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