I want my code to prompt the user for a list of eigenvalues, run through every possible 0,1 matrix with that number of vertices, create a list of all possible eigenvalues, and if any match what the user puts in, it returns the corresponding matrix. Got stuck here where it won't iterate correctly:
prompt='How many eigenvalues: ';
x=input(prompt);
prompt2='Enter Eignevalues: ';
y=input(prompt2,'s');
combs=dec2base(0:power(2,x*x)-1,2)-'0';
combs_matshaped=reshape(permute(combs,[3 2 1]),x,x,[]);
for l=combs_matshaped
disp(eig(l))
end
Any ideas on how to structure the for loop?