Sorry I made a mistake. The answer is correct. To take the same effect, the infinite term inf should be made to a large finite value, say 1e30. The command should be
>> n=7; A=ones(n)+1e30*eye(n)
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!