puvip / addi

Automatically exported from code.google.com/p/addi
0 stars 0 forks source link

multidimensional for loop #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a file called testfunc.m
2. Paste the following code into the file:

function t=testfunc()
t=[0;0];
for m=[1 2 3;4 5 6]
    t=t+m;
end

3. Navigate in addi to the directory where testfunc.m is located
4. Call testfunc()

What is the expected output? What do you see instead?

Expected Output:
ans =
6
15

What do you see instead?
ans =
21
21

What version of the product are you using? On what operating system?
Addi 1.84
Android OS, v2.3 (Gingerbread)

Please provide any additional information below.
Both Octave and Matlab consider a column of a given matrix m in each iteration 
of a for-loop for n=m ... end. But addi starts an iteration for each entry of 
matrix m in a given for-loop for n=m ... end.

Original issue reported on code.google.com by TristanB...@gmail.com on 14 Nov 2011 at 10:57

GoogleCodeExporter commented 9 years ago

Original comment by corbi...@gmail.com on 16 Nov 2011 at 6:36