help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

octave_read_complex


From: Jonathan Stickel
Subject: octave_read_complex
Date: Tue, 05 Feb 2008 08:03:41 -0700
User-agent: Thunderbird 2.0.0.9 (Macintosh/20071031)

I would like to read a complex number from a string in an oct-file function. Below is the relevant code and output for the complex number string.

  ComplexMatrix data;
  istringstream strstrm;
(loop)
  data(i,j) = octave_read_complex(strstrm);
  cout << strstrm.str() << " " << data(i,j) << "\n";
(end loop)

output:
 1+1i (1,0)

Why isn't the complex number being read correctly?

Thanks,
Jonathan


reply via email to

[Prev in Thread] Current Thread [Next in Thread]