Path: news.mathworks.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!news.mathforum.org!not-for-mail
From: G0Y <gbencedi@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: reading complex marix from file
Date: Thu, 13 Nov 2008 16:36:38 EST
Organization: The Math Forum
Lines: 10
Message-ID: <7185560.1226612229256.JavaMail.jakarta@nitrogen.mathforum.org>
NNTP-Posting-Host: nitrogen.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1226612229 29618 144.118.30.135 (13 Nov 2008 21:37:09 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Thu, 13 Nov 2008 21:37:09 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:500716


Hi,

How can I load a file, which has complex elements?

I do the following, but I do not know how to define the "format" part of the fscanf.

>> fin = fopen('vector.txt', 'r');
>> A = fscanf(fin,'%f+f%i' ,[8,3]);

This '%f+%fi' does not work.