Prev: Need to Speed up Position[]
Next: documentation program
From: EliL on 1 Jul 2010 08:26 I am trying to generate a set of Manipulate controls based on the contents of some lists. For example, say I have lists: school = {"rynj", "bpy", "moriah", "yavneh", "noam"} schoolName = {"RYNJ", "BPY", "Moriah", "Yavneh", "Noam"} Then, I'd like my Manipulate controls to be: In[508]:= Table[{{ToExpression[ StringJoin[ToLowerCase[schoolsC[[n]]], "Q"]], schools[[n]]}, {ToExpression[ToLowerCase[schoolsC[[n]]]] -> True, Null -> False}}, {n, 1, Length[schools]}] Out[508]= {{{rynjQ, "RYNJ"}, {rynj -> True, Null -> False}}, {{bpyQ, "BPY"}, {bpy -> True, Null -> False}}, {{moriahQ, "Moriah"}, {moriah -> True, Null -> False}}, {{yavnehQ, "Yavneh"}, {yavneh -> True, Null -> False}}, {{noamQ, "Noam"}, {noam -> True, Null -> False}}} But without that outer { }, since Manipulate controls need to be , {control1},{control2},etc, not, {{control1},{control2},etc}. Any ideas how to do this? TIA
|
Pages: 1 Prev: Need to Speed up Position[] Next: documentation program |