Hi all,
I thought to just add to my previous thread, but created a new one because the topic is a bit different. Hope y'all don't mind.
Anyhow:
a) How would I concatenate two tuples? Or a tuple with a variable?
Say I have
testtuple = (1,2,3)
testvar = 4
and want to get
newtuple = (1,2,3,4)
(not ((1,2,3),4)
I've tried
newtuple = tuple(testtuple...,testvar...)
newtuple = tuple(testtuple...,testvar)
newtuple = testtuple...,testvar
but none of those have worked to produce the desired result.
b) I have an array of tuples
tuplearray = [(a1,b1,c1),(a2,b2,c2)...,(an,bn,cn)]
How could I then unpack the array into
aarray = [a1,a2...,an]
barray = [b1,b2...,bn]
carray = [c1,c3...,cn]
such that each position in the tuple gets unpacked into a corresponding individual array?
In Python, I would use
alist,blist,clist = zip(*tuplelist)
It appears that
aarray,barray,carray = zip(tuplearray...)
is not the Julia equivalent.
My version of Julia is the .3 RC.
Thanks for your help