Question

Use the create_matrix function from the tutorial file, along with a function a (i, j) (which...

Use the create_matrix function from the tutorial file, along with a function a (i, j) (which you will have to create) to produce the following 17 × 17 matrix. Then find its determinant.
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
5 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
6 6 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
7 7 7 1 1 1 1 1 1 1 1 1 1 1 1 1 1
8 8 8 8 1 1 1 1 1 1 1 1 1 1 1 1 1
9 9 9 9 9 1 1 1 1 1 1 1 1 1 1 1 1
10 10 10 10 10 10 1 1 1 1 1 1 1 1 1 1 1
11 11 11 11 11 11 11 1 1 1 1 1 1 1 1 1 1
12 12 12 12 12 12 12 12 1 1 1 1 1 1 1 1 1
13 13 13 13 13 13 13 13 13 1 1 1 1 1 1 1 1
14 14 14 14 14 14 14 14 14 14 1 1 1 1 1 1 1
15 15 15 15 15 15 15 15 15 15 15 1 1 1 1 1 1
16 16 16 16 16 16 16 16 16 16 16 16 1 1 1 1 1
17 17 17 17 17 17 17 17 17 17 17 17 17 1 1 1 1
18 18 18 18 18 18 18 18 18 18 18 18 18 18 1 1 1
19 19 19 19 19 19 19 19 19 19 19 19 19 19 19 1 1
20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 1

function [A] = create_matrix(a,n,m)
A = zeros(n,m);
for i=1:n
for j=1:m
A(i,j)=a(i,j);
end
end
end

2 0
Add a comment Improve this question Transcribed image text
Answer #1

CODE :

clc; % Clears the screen
clear all;
a=@(i,j) (i<=j)+(i>j)*(i+3);
A=create_matrix(a,17,17);
det(A)
function A=create_matrix(a,n,m)
A=zeros(n,m);
for i=1:n
for j=1:m
A(i,j)=a(i,j);
end
end
end


OUTPUT :

2.027418340147200e+16

Add a comment
Know the answer?
Add Answer to:
Use the create_matrix function from the tutorial file, along with a function a (i, j) (which...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT