help-octave
[Top][All Lists]
Advanced

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

Error assigning complex values to pre-initated matrix


From: Neilen Marais
Subject: Error assigning complex values to pre-initated matrix
Date: Tue, 04 Jan 2005 11:34:29 +0200

Hi All.

This seems to me like something that should work:

measured_data = zeros(data_points,2);

## Measure data for line loaded with 100 Ohm

measured_data(1,:) = [0.0130853 +0.00915463j,\ 1];      # l = 5.2mm

I get the following error:

error: A(I, J) = X: X must be a scalar or the number of elements in I
must
error: match the number of rows in X and the number of elements in J
must
error: match the number of columns in X
error: assignment failed, or no method for `matrix = complex matrix'
error: evaluating assignment expression near line 155, column 20

However, if I assign the individual entries in the matrix as scalars,
all seems to be well. Am I doing something wrong?

Thanks
Neilen


-- 
Neilen Marais <address@hidden>
EMSS



-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

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