
Student Support Forum: 'Times[3, Null] in output, not just "3"' topicStudent Support Forum > General > "Times[3, Null] in output, not just "3""
| Author |
Comment/Response |
jim farrugia
|
12/31/00 4:23pm
I have looked at other posts on related Times[number, Null] problems, but haven't been able to match any of these solutions to my problem.
Here is my code:
----------------------------------------------------------
myFunc[myArg_] :=
Module[{myIndex},
For[i = 1, i <= Length[myInputMatrix], i++,
myIndex = myInputMatrix[[i, 2]];
]
imyIndex
]
-----------------------------------------------------
Then,I do this:
myval = myfunc[bogus]//FullForm
And I get this as output:
Times[3, Null]
I don't understand why my assignment of
myIndex = myInputMatrix[[i,2]];
is getting me this extra Null value, and not
just the integer value 3.
I've checked and double checked my input matrix,
and the only thing out of the ordinary is that the
first column of values are ''reals'' (e.g., 57.33),
while the other two columns are integers.
Any help would be much appreciated.
Thanks,
Jim
URL: , |
|
| | | |
 | |
|