Path: news.mathworks.com!not-for-mail
From: "Sandra " <smh31.nospam@sussex.ac.uk>
Newsgroups: comp.soft-sys.matlab
Subject: imag and real don't work
Date: Thu, 24 Jul 2008 11:04:04 +0000 (UTC)
Organization: Sussex Univ
Lines: 20
Message-ID: <g69nj3$9he$1@fred.mathworks.com>
Reply-To: "Sandra " <smh31.nospam@sussex.ac.uk>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1216897444 9774 172.30.248.37 (24 Jul 2008 11:04:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 24 Jul 2008 11:04:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 639279
Xref: news.mathworks.com comp.soft-sys.matlab:481478



I am sure this must be a simple thing, but it is doing my
head in!!! imag and real don't work for me see below:

>> real(0.0116 + 0.3333i)
??? Subscript indices must either be real positive integers
or logicals.

>> real(2+3*i)
??? Subscript indices must either be real positive integers
or logicals.

>> imag(2+3*i)
??? Subscript indices must either be real positive integers
or logicals.


the last two are from the matlab example! what am I doing wrong?

any advice appreciated,
sandra