I'm trying to assign arrays to edge properties/weights
tail = 1:3;head = 2:4;G = graph(tail,head);G.Edges.property(1) = 1 % works
G.Edges.property(1) = [1 2] % doesn't work
However , I get the following error while trying to assign an array to a single edge
Unable to perform assignment because the left and right sides have a different number of elements.graph
Is there an alternate way to store array for each edge?
Best Answer