Path: news.mathworks.com!not-for-mail
From: "Anthony " <anthony.campos@baesystems.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Complex structure to text file
Date: Thu, 9 Aug 2007 20:20:00 +0000 (UTC)
Organization: BAE Systems
Lines: 43
Message-ID: <f9fstg$ft6$1@fred.mathworks.com>
References: <f9fq2l$2vi$1@fred.mathworks.com> <f9fsgh$a17$1@fred.mathworks.com>
Reply-To: "Anthony " <anthony.campos@baesystems.com>
NNTP-Posting-Host: webapp-00-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1186690800 16294 172.30.248.35 (9 Aug 2007 20:20:00 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Aug 2007 20:20:00 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1043667
Xref: news.mathworks.com comp.soft-sys.matlab:423260


It would be nice to have one complex number per row, in the 
following format:
a + bi

"Rick Rosson" <rrosson@mathworks.com> wrote in message 
<f9fsgh$a17$1@fred.mathworks.com>...
> Hi Anthony,
> 
> It is definitely possible to write complex numbers to a 
text file, but the 
> exact syntax depends on how you want to format the 
numbers.
> 
>   1. Do you want to show the numbers as strings using "i" 
or "j"
>      to represent the imaginary unit?  For example:
> 
>         2.512 + 3.718i    OR
>         2.512 + 3.718j
> 
>   2. How do you want the numbers delimited?  In other 
words, do
>      you want to separate each element with a space, a 
comma, a
>      tab, or some other character?
> 
> Thanks.
> 
> Rick
> 
> 
> "Anthony " <anthony.campos@baesystems.com> wrote in 
message 
> news:f9fq2l$2vi$1@fred.mathworks.com...
> >I am trying to take a data that's in a matrix in matlab 
and
> > output it to a file.  In each cell there is a complex
> > number. Is there a way to write this complex number to a
> > file? and maintain the precision, or change the 
precision? 
> 
>