Hello everyone, My question is, in the below code, idsabs can take any value from 1 to 16. Depending on the value of idsabs, i want to set the value of idcabs. Is there any other way of doing this, because i think its too long just to get a single value. Thank you so much and Happy New Year.
if idsabs>=1 && idsabs<=2 idcabs=1; elseif idsabs>=3 && idsabs<=4 idcabs=3; elseif idsabs>=5 && idsabs<=6 idcabs=4; elseif idsabs>=7 && idsabs<=8 idcabs=6; elseif idsabs>=9 && idsabs<=10 idcabs=5; elseif idsabs>=11 && idsabs<=12 idcabs=7; elseif idsabs>=13 && idsabs<=14 idcabs=8; elseif idsabs>=15 && idsabs<=16 idcabs=2; end
Best Answer