Simplifying the If statements.
1 view (last 30 days)
Show older comments
Commented: Aftab Ahmed Khan on 7 Mar 2015
Hello Everyone, I am making this routing table for my network which is working fine but is there any efficient way of doing this, as i am running my simulation for 100000 iterations. In the following code, the variable idabs takes a value between 1 to 16 and depending on its value, the value of idcabs is generated accordingly.Thank you.
James Tursa on 7 Mar 2015
cabs_vector = [9 10 11 12 9 10 11 12 13 14 15 16 13 14 15 16];
idcabs = cabs_vector(idabs);
More Answers (0)
Find more on Language Fundamentals in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!