Ruben
Posts:
16
Registered:
6/17/10
|
|
Re: Assign Vector to Structure Array?
Posted:
Feb 2, 2012 6:10 AM
|
|
Hello,
what if I have a array of structures (AS) with various fields (AS.x, AS.y, ...) and I want to assign the values of a vector v= [1 2 3 4] to one of the fields, e.g. to AS.x, in such a way that:
AS(1).x = v(1); ... AS(end).x = v(end);
I thought deal might help but it doesn't. I also tried with [AS.x] = v but it says "Too many output arguments."
Thank you
|
|