compex vector in 'C' -> complex vector in 'octave'

John W. Eaton jwe at bevo.che.wisc.edu
Thu Apr 24 14:26:31 CDT 2008


On 24-Apr-2008, James Sherman Jr. wrote:

| I'm not sure how "elegant" it is, but I'd just do
| 
| y = x(1:2:end) + x(2:2:end)*i;

Or

  y = complex (x(1:2:end), x(2:2:end));

jwe


More information about the Help-octave mailing list