Solved
Inscrutable Error with Simple Program
- December 1, 2011
- 2 replies
- 6879 views
My goal was to determine the size of a single dimension index based on the
contents of the first column [row] of a matrix. For instance if I have Q=(1,0,2) I want
an index N=2, for two non-0 elements for Q1 and Q3. Q can be any size and any
number of 0 elements can exist. I attach a simple replica of the program I used
to calculate this index, using the "for" and "if" functions. It seems simple so I am
feeling pretty stupid right now. Can you see anything wrong with the attached
program? It was developed in MathCAD 2001i [V8].

