autiger
Structural
- Jul 13, 2001
- 5
Guys, I could use a little help. I am trying to learn MathCad and have come up on something I need a little help with. I have a matrix as shown below.
A = 1 1
0 0
0 0
I need to coun the number of "1"s and the number of "0"s. I set variables named NumFree and NumRest to zero. If A i,j is one, then I want to add 1 to NumRest. If A i,j is zero, I want to add 1 to NumFree.
Any help would be greatly appreciated.
A = 1 1
0 0
0 0
I need to coun the number of "1"s and the number of "0"s. I set variables named NumFree and NumRest to zero. If A i,j is one, then I want to add 1 to NumRest. If A i,j is zero, I want to add 1 to NumFree.
Any help would be greatly appreciated.