Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有两个数组,它们是,
aa={a,b} bb={1,4}
我只能玩数组aa和bb. 我怎样才能使a=1和b=4?这意味着如果我输入a(然后按shift- enter),输出为 1。
aa
bb
a=1
b=4
a
你可以MapThread这样使用:
MapThread
aa={a,b} bb={1,4} MapThread[Set, {aa,bb}]
这将与通过并将它们设置为一和一相同,例如a = 1and b = 4。
a = 1
b = 4