MATLAB: How to find number with Matlab

for statementif statementsix digit number

One of my professors has assigned me the task of writing a program to solve a given question:
Find a six digit number in which the first digit is one more than the third, the second digit is one less than the fourth, the fifth digit is one less than the third, and the sixth digit is one more than the fourth. The sum of the second and third digits equals the first. The sum of all digits is thirty
We are only allowed to use nested for and if statements. I have had zero instruction in Matlab and no programming background. I've been trying to figure this out for hours and am completely lost. Could someone please help me out?