From help-request at octave dot org Tue Jan 4 03:17:53 2005 Subject: Error assigning complex values to pre-initated matrix From: Neilen Marais To: help at octave dot org 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 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 -------------------------------------------------------------