if-else with select run from specific value in matlab

4 visualizaciones (últimos 30 días)
Anuchit Wibun
Anuchit Wibun el 4 de Feb. de 2015
Comentada: Michael Haderlein el 4 de Feb. de 2015
Hello everybody!
Can anybody guide me how to do this right in matlab. Actually How I can distinguish condition from specific value that i defined.
ex.
p_d = [1 3 6 8 9];
c_d = [ 2 4 5 7 10];
if a == 1 || a==3 || a==6 || a==8 || a==9;
%do this;
else a==2 || a==4 || a==5 || a==7 || a==10;
%do that;
end
Kindly suggest me how to do it..
Thank you every much.

Respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by