SlideShare uma empresa Scribd logo
1 de 1
Instructions Create a script called script15.m. The script should assume a positive integer n is
assigned in the command window. The script should create an n-by-n matrix Q according to the
following examples: n 1; script15 10 0 1 n 2; script 15 1 0 0 0 0 1 0 0 0 0 20 0 0 0 2 n 4; script 15
1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0
0 4 0 0 0 0 0 0 0 0 4
Solution
Option 2 is correct. you can create a sub-matrix taking a sub-part of a matrix. You can also select
the elements in the m( th) through n (th) columns, for this we write: a(:,m:n)
In this way, we will get option 2.

Mais conteúdo relacionado

Mais de rtodd972

In what way (or ways) is the current Knowledge Revolution a child of t.docx
In what way (or ways) is the current Knowledge Revolution a child of t.docxIn what way (or ways) is the current Knowledge Revolution a child of t.docx
In what way (or ways) is the current Knowledge Revolution a child of t.docxrtodd972
 
In the Lewis structures listed below- M and X represent various elemen.docx
In the Lewis structures listed below- M and X represent various elemen.docxIn the Lewis structures listed below- M and X represent various elemen.docx
In the Lewis structures listed below- M and X represent various elemen.docxrtodd972
 
In the independent data marts architecture- the independent data marts.docx
In the independent data marts architecture- the independent data marts.docxIn the independent data marts architecture- the independent data marts.docx
In the independent data marts architecture- the independent data marts.docxrtodd972
 
iron (III) chloride + sodium thiosulfate - write the half reactions an.docx
iron (III) chloride + sodium thiosulfate - write the half reactions an.docxiron (III) chloride + sodium thiosulfate - write the half reactions an.docx
iron (III) chloride + sodium thiosulfate - write the half reactions an.docxrtodd972
 
It has been said that the advantage that leading-edge retailers such a.docx
It has been said that the advantage that leading-edge retailers such a.docxIt has been said that the advantage that leading-edge retailers such a.docx
It has been said that the advantage that leading-edge retailers such a.docxrtodd972
 
ISP who has allowed them the use of 4 externally routable IP addresses.docx
ISP who has allowed them the use of 4 externally routable IP addresses.docxISP who has allowed them the use of 4 externally routable IP addresses.docx
ISP who has allowed them the use of 4 externally routable IP addresses.docxrtodd972
 
Is TOD a input or output-- Is this correct--- Inputs- start- stop- fl.docx
Is TOD a input or output--  Is this correct--- Inputs- start- stop- fl.docxIs TOD a input or output--  Is this correct--- Inputs- start- stop- fl.docx
Is TOD a input or output-- Is this correct--- Inputs- start- stop- fl.docxrtodd972
 
Is there a universal code for ethical business behavior- (Check the De.docx
Is there a universal code for ethical business behavior- (Check the De.docxIs there a universal code for ethical business behavior- (Check the De.docx
Is there a universal code for ethical business behavior- (Check the De.docxrtodd972
 
In the following search function for a linked list (using the Node and.docx
In the following search function for a linked list (using the Node and.docxIn the following search function for a linked list (using the Node and.docx
In the following search function for a linked list (using the Node and.docxrtodd972
 
Is it easier to perform a computer forensic investigation if the suspe.docx
Is it easier to perform a computer forensic investigation if the suspe.docxIs it easier to perform a computer forensic investigation if the suspe.docx
Is it easier to perform a computer forensic investigation if the suspe.docxrtodd972
 
Is a public park considered to be a public good- Why or why not-Soluti.docx
Is a public park considered to be a public good- Why or why not-Soluti.docxIs a public park considered to be a public good- Why or why not-Soluti.docx
Is a public park considered to be a public good- Why or why not-Soluti.docxrtodd972
 
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docx
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docxIs a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docx
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docxrtodd972
 
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docx
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docxIron(II) ion reacts with water to a small extent by a hydrolysis react.docx
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docxrtodd972
 
Investors require a 17- rate of return on Levine Company-'s stock (tha.docx
Investors require a 17- rate of return on Levine Company-'s stock (tha.docxInvestors require a 17- rate of return on Levine Company-'s stock (tha.docx
Investors require a 17- rate of return on Levine Company-'s stock (tha.docxrtodd972
 
ionic compounds crystallize in a cubic closest packed array of anions.docx
ionic compounds crystallize in a cubic closest packed array of anions.docxionic compounds crystallize in a cubic closest packed array of anions.docx
ionic compounds crystallize in a cubic closest packed array of anions.docxrtodd972
 
Invoke Netbeans and create a project Exercise 7- Enter the following.docx
Invoke Netbeans and create a project Exercise 7-  Enter the following.docxInvoke Netbeans and create a project Exercise 7-  Enter the following.docx
Invoke Netbeans and create a project Exercise 7- Enter the following.docxrtodd972
 
Investors and management use the statement of cash flows to evaluate a.docx
Investors and management use the statement of cash flows to evaluate a.docxInvestors and management use the statement of cash flows to evaluate a.docx
Investors and management use the statement of cash flows to evaluate a.docxrtodd972
 
In the short run- what distinguishes liquidity from profitability- 1-.docx
In the short run- what distinguishes liquidity from profitability- 1-.docxIn the short run- what distinguishes liquidity from profitability- 1-.docx
In the short run- what distinguishes liquidity from profitability- 1-.docxrtodd972
 

Mais de rtodd972 (18)

In what way (or ways) is the current Knowledge Revolution a child of t.docx
In what way (or ways) is the current Knowledge Revolution a child of t.docxIn what way (or ways) is the current Knowledge Revolution a child of t.docx
In what way (or ways) is the current Knowledge Revolution a child of t.docx
 
In the Lewis structures listed below- M and X represent various elemen.docx
In the Lewis structures listed below- M and X represent various elemen.docxIn the Lewis structures listed below- M and X represent various elemen.docx
In the Lewis structures listed below- M and X represent various elemen.docx
 
In the independent data marts architecture- the independent data marts.docx
In the independent data marts architecture- the independent data marts.docxIn the independent data marts architecture- the independent data marts.docx
In the independent data marts architecture- the independent data marts.docx
 
iron (III) chloride + sodium thiosulfate - write the half reactions an.docx
iron (III) chloride + sodium thiosulfate - write the half reactions an.docxiron (III) chloride + sodium thiosulfate - write the half reactions an.docx
iron (III) chloride + sodium thiosulfate - write the half reactions an.docx
 
It has been said that the advantage that leading-edge retailers such a.docx
It has been said that the advantage that leading-edge retailers such a.docxIt has been said that the advantage that leading-edge retailers such a.docx
It has been said that the advantage that leading-edge retailers such a.docx
 
ISP who has allowed them the use of 4 externally routable IP addresses.docx
ISP who has allowed them the use of 4 externally routable IP addresses.docxISP who has allowed them the use of 4 externally routable IP addresses.docx
ISP who has allowed them the use of 4 externally routable IP addresses.docx
 
Is TOD a input or output-- Is this correct--- Inputs- start- stop- fl.docx
Is TOD a input or output--  Is this correct--- Inputs- start- stop- fl.docxIs TOD a input or output--  Is this correct--- Inputs- start- stop- fl.docx
Is TOD a input or output-- Is this correct--- Inputs- start- stop- fl.docx
 
Is there a universal code for ethical business behavior- (Check the De.docx
Is there a universal code for ethical business behavior- (Check the De.docxIs there a universal code for ethical business behavior- (Check the De.docx
Is there a universal code for ethical business behavior- (Check the De.docx
 
In the following search function for a linked list (using the Node and.docx
In the following search function for a linked list (using the Node and.docxIn the following search function for a linked list (using the Node and.docx
In the following search function for a linked list (using the Node and.docx
 
Is it easier to perform a computer forensic investigation if the suspe.docx
Is it easier to perform a computer forensic investigation if the suspe.docxIs it easier to perform a computer forensic investigation if the suspe.docx
Is it easier to perform a computer forensic investigation if the suspe.docx
 
Is a public park considered to be a public good- Why or why not-Soluti.docx
Is a public park considered to be a public good- Why or why not-Soluti.docxIs a public park considered to be a public good- Why or why not-Soluti.docx
Is a public park considered to be a public good- Why or why not-Soluti.docx
 
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docx
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docxIs a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docx
Is a firm-'s 10-K an unbiased perspective on its strengths and weaknes.docx
 
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docx
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docxIron(II) ion reacts with water to a small extent by a hydrolysis react.docx
Iron(II) ion reacts with water to a small extent by a hydrolysis react.docx
 
Investors require a 17- rate of return on Levine Company-'s stock (tha.docx
Investors require a 17- rate of return on Levine Company-'s stock (tha.docxInvestors require a 17- rate of return on Levine Company-'s stock (tha.docx
Investors require a 17- rate of return on Levine Company-'s stock (tha.docx
 
ionic compounds crystallize in a cubic closest packed array of anions.docx
ionic compounds crystallize in a cubic closest packed array of anions.docxionic compounds crystallize in a cubic closest packed array of anions.docx
ionic compounds crystallize in a cubic closest packed array of anions.docx
 
Invoke Netbeans and create a project Exercise 7- Enter the following.docx
Invoke Netbeans and create a project Exercise 7-  Enter the following.docxInvoke Netbeans and create a project Exercise 7-  Enter the following.docx
Invoke Netbeans and create a project Exercise 7- Enter the following.docx
 
Investors and management use the statement of cash flows to evaluate a.docx
Investors and management use the statement of cash flows to evaluate a.docxInvestors and management use the statement of cash flows to evaluate a.docx
Investors and management use the statement of cash flows to evaluate a.docx
 
In the short run- what distinguishes liquidity from profitability- 1-.docx
In the short run- what distinguishes liquidity from profitability- 1-.docxIn the short run- what distinguishes liquidity from profitability- 1-.docx
In the short run- what distinguishes liquidity from profitability- 1-.docx
 

Último

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONHumphrey A Beña
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfphamnguyenenglishnb
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17Celine George
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)cama23
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Jisc
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSJoshuaGantuangco2
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Celine George
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parentsnavabharathschool99
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptxmary850239
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxMaryGraceBautista27
 

Último (20)

THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATIONTHEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
THEORIES OF ORGANIZATION-PUBLIC ADMINISTRATION
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdfAMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
AMERICAN LANGUAGE HUB_Level2_Student'sBook_Answerkey.pdf
 
How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17How to Add Barcode on PDF Report in Odoo 17
How to Add Barcode on PDF Report in Odoo 17
 
Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)Global Lehigh Strategic Initiatives (without descriptions)
Global Lehigh Strategic Initiatives (without descriptions)
 
Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...Procuring digital preservation CAN be quick and painless with our new dynamic...
Procuring digital preservation CAN be quick and painless with our new dynamic...
 
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptxYOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
YOUVE GOT EMAIL_FINALS_EL_DORADO_2024.pptx
 
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTSGRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
GRADE 4 - SUMMATIVE TEST QUARTER 4 ALL SUBJECTS
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
call girls in Kamla Market (DELHI) 🔝 >༒9953330565🔝 genuine Escort Service 🔝✔️✔️
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17Field Attribute Index Feature in Odoo 17
Field Attribute Index Feature in Odoo 17
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Choosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for ParentsChoosing the Right CBSE School A Comprehensive Guide for Parents
Choosing the Right CBSE School A Comprehensive Guide for Parents
 
4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx4.18.24 Movement Legacies, Reflection, and Review.pptx
4.18.24 Movement Legacies, Reflection, and Review.pptx
 
Science 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptxScience 7 Quarter 4 Module 2: Natural Resources.pptx
Science 7 Quarter 4 Module 2: Natural Resources.pptx
 

Instructions Create a script called script15-m- The script should assu.docx

  • 1. Instructions Create a script called script15.m. The script should assume a positive integer n is assigned in the command window. The script should create an n-by-n matrix Q according to the following examples: n 1; script15 10 0 1 n 2; script 15 1 0 0 0 0 1 0 0 0 0 20 0 0 0 2 n 4; script 15 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 20 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 30 0 0 0 0 0 0 0 3 0 0 0 0 0 0 0 0 4 0 0 0 0 0 0 0 0 4 Solution Option 2 is correct. you can create a sub-matrix taking a sub-part of a matrix. You can also select the elements in the m( th) through n (th) columns, for this we write: a(:,m:n) In this way, we will get option 2.