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
  • 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...

  • Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16...

    Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16 10 17 14 14 16 7 10 12 19 15 16 14 9 12 21 13 10 16 12 16 13 17 17 13 14 18 11 12 15 16 13 18 16 17 12 12 14 9 11 14 19 13 11 17 11 13 15 14 18 18 18 12 10 11 13 14 11 14 18 13 13 19 17 14...

  • Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16...

    Cork price: 16 10 15 10 17 11 14 13 11 14 11 16 18 16 10 17 14 14 16 7 10 12 19 15 16 14 9 12 21 13 10 16 12 16 13 17 17 13 14 18 11 12 15 16 13 18 16 17 12 12 14 9 11 14 19 13 11 17 11 13 15 14 18 18 18 12 10 11 13 14 11 14 18 13 13 19 17 14...

  • Suppose there are 100 identical firms in the market and the luggage industry is perfectly competitive....

    Suppose there are 100 identical firms in the market and the luggage industry is perfectly competitive. What does the market supply curve look like? 20 19 18 17 16 15 14 13 12 11 A 10 9 8 7 6 5 4 20 19 18 17 16 15 14 13 12 11 A 10 8 7 6 2 1 0 0 0 1 2 3 4 5 6 7 8 9 10 11 12 0 1 2 3 4 5...

  • Are all disciplines in the University equally boring or there are some more boring than others?  To...

    Are all disciplines in the University equally boring or there are some more boring than others?  To answer that question, a study performed at Columbia University counted the number of times per 5-minute interval when professors from three different departments said “uh” or “ah” during lectures to fill gaps between words.  These counts were used as a proxy (approximation) for the measure of class boredom.  The data from observing one hundred of 5-minute intervals from each of three departments’ professors were recorded in...

  • PYTHON PROGRAMMING: DO NOT USE INPUT FUNCTION, use sys.argv Write a program that generates two random...

    PYTHON PROGRAMMING: DO NOT USE INPUT FUNCTION, use sys.argv Write a program that generates two random integer numbers between 1 and 100. Then, print out the numbers between the two randomly generated ones using a while loop. The output is shown below. Output: a) start:4, end:14 4 5 6 7 8 9 10 11 12 13 14 b) start:15, end:20 15 16 17 18 19 20

  • 1. estimate a linear cost function 2. estimate a quadratic cost function 3. estimate a cubric...

    1. estimate a linear cost function 2. estimate a quadratic cost function 3. estimate a cubric cost function 1 A B с D 1 Cost data for a lumber mill 2 3 TC 4 11 5 32 2 6 93 3 7 248 4 8 575 5 9 1176 6 10 2177 7 11 3728 8 12 6003 9 13 9200 10 14 13541 11 15 19272 12 1626663 13 17 36008 14 18 47625 15 19 61856 16 20...

  • C++ how can I fix these errors this is my code main.cpp #include "SpecialArray.h" #include <...

    C++ how can I fix these errors this is my code main.cpp #include "SpecialArray.h" #include <iostream> #include <fstream> #include <string> using namespace std; int measureElementsPerLine(ifstream& inFile) {    // Add your code here.    string line;    getline(inFile, line);    int sp = 0;    for (int i = 0; i < line.size(); i++)    {        if (line[i] == ' ')            sp++;    }    sp++;    return sp; } int measureLines(ifstream& inFile) {    // Add your code here.    string line;    int n = 0;    while (!inFile.eof())    {        getline(inFile,...

  • Review the 6 karyotypes in Figure 10 and determine the chromosomal disorder. Record the chromosomal disorder...

    Review the 6 karyotypes in Figure 10 and determine the chromosomal disorder. Record the chromosomal disorder in Data Table 3. Describe the genotype of each chromosomal disorder and record in Data Table 3. Describe the phenotype of each chromosomal disorder and record in Data Table 3. Data Table 3: Karyotype to Genotype to Phenotype # Chromosomal Disorder Genotype Phenotype 1 2 3 4 5 6 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7...

  • j. Create a Conditional Probabilities Pivot Table (% of column) for ‘Gender’ and ‘Prefer Scent’, to know the probability...

    j. Create a Conditional Probabilities Pivot Table (% of column) for ‘Gender’ and ‘Prefer Scent’, to know the probability that a customer will be of a certain gender given Yes or No preference for the scent. (For example, that if a customer comes into the store because they prefer the scent, what is the probability that the customer will be a female). Create another Conditional Probabilities Table (% of row) for ‘Gender’ and ‘Prefer Scent’, to know the probability that...

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