From help-request at octave dot org Mon Jan 31 10:28:07 2005 Subject: Newbie, MATLAB, {-indexing incompatibility From: "F L" To: help at octave dot org Date: Mon, 31 Jan 2005 16:30:14 +0000 Hey, I found nice MATLAB-code and installed GNU Octave 2.1.50 (for Windows). '--traditional' seems to be on by default. Some of the code runs. Some doesn't. Here is an offending piece of MATLAB-code: Vname = []; lnames = []; l=1; for i=1:neqs; for m=1:nlag; Vname{l} = str2mat(['variable ',num2str(i)]); lnames{l} = str2mat([' lag',num2str(m)]); l = l+1; end; end; The first innermost line Vname{l} = str2mat(['variable ',num2str(i)]); in for-loops contains error according to Octave, but it is supposed to run in MATLAB. I don't know MATLAB-language. What's the left side of assignment supposed to do and how I can circumvent this problem? error: matrix cannot be indexed with { error: assignment failed, or no method for `matrix = string' error: evaluating assignment expression near line 93, column 14 error: evaluating for command near line 92, column 1 error: evaluating for command near line 91, column 1 error: evaluating if command near line 81, column 1 error: evaluating switch command near line 47, column 1 _________________________________________________________________ Play online games with your friends with MSN Messenger http://messenger.msn.nl/ ------------------------------------------------------------- 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 -------------------------------------------------------------