FindRestNumber.m

# FindRestNumber.m - function[B,error]=FindRestNumber(i,j,A...

This preview shows page 1. Sign up to view the full content.

function [B,error]=FindRestNumber(i,j,A) o1=ceil(i/3)*3-2; o2=ceil(j/3)*3-2; x=[sort(A(i,:)) sort(A(:,j))' sort([A(o1,o2:o2+2) A(o1+1,o2:o2+2) A(o1+2,o2:o2+2)])]; for i=1:8 if ((x(i)==x(i+1))&&(x(i)~=0))||((x(9+i)==x(9+i+1))&&(x(9+i)~=0))|| ((x(18+i)==x(18+i+1))&&(x(18+i)~=0)) error=1; break else error=0;
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern