How would I write the following in Objective-C? Each integer represents a state of a motor (5 motors, with clockwise (1), off (0), counterclockwise (-1) as the states). There are 18 sequences where each motors is "told" to run in CW or CCW direction, or stay off.
{{1,0,0,0,0},
{0,0,-1,0,0},
{0,1,0,1,0},
// etc. for another 15 sets
}
Couple of questions:
- I only want to read these values...should I use
NSSet? - Would I write the integers as objects? (etc.
@"1") Or can I keep them as integers - If I wanted to add a known time stamp in the set, would that change the identity of the set (meaning, it would no longer be an integer-based set) ? Ex: the first time stamp would be 0.3 seconds.
Let me know if you need anymore information. Thanks
we can direct add integer values in array. and can access value with intvalue.