This is the answer I searched online, which should be beyond the scope of the textbook. I will wait and see.
1. Suppose a life protein consists of four amino acids. The molecular weights of these four amino acids are: 577 1, 97 10 1. The molecular weight of protein was determined to be 800. What are the possibilities for the composition of protein?
[opinion]
Health: This is an indefinite equation problem: 800 = 57× x1+71× x2+97× x3+10/× x4.
X 1, x2, x3 and x4 are integers.
Teacher: We can find all possible values of x 1, x2, x3, x4, x 1 through enumeration. Possible values are 0 to 15, x2 is 0 to 1 1, x3 is 0 to 8, and x4 is 0 to 7.
(The above should be an idea or something, and the following is an answer. )
a =[57 7 1 97 10 1]; % Note: A: Molecular weight of amino acids
n = 0; % Note: N, count, number of solutions
For i=0: 15% Note: I, the number of molecules of amino acids with molecular weight of 57.
For j=0: 1 1% Note: J, the number of molecules of amino acids with molecular weight of 7 1
For k=0:8% Note: K, the number of molecules of amino acids with molecular weight of 97.
For l=0:7% Note: L, the number of molecules of amino acids with molecular weight of 10 1
If I * a (1)+j * a (2)+k * a (3)+l * a (4) = = 800.
M=[i j k l]% Note: The result is displayed.
n = n+ 1;
End; End; End; End; end
Please accept the answer and support me.