You can achieve this by creating a vector and then summing the second and third elements together. Here is an example in MATLAB:
main.m150 chars7 lines
This code will output 11
, which is the sum of the second and third elements (3 + 8) in the vector [5, 3, 8, 2, 6].
gistlibby LogSnag