SlideShare a Scribd company logo
1 of 2
MATLAB
Write a function that takes in a number and produces an array that represents the multiplication
table for that number. A multiplication table is an NxN array where the first row and column of
the array are the numbers from 0 to N, inclusive. The rest of the table is comprised of the
products between that row number and that column number. For example, if the number is 4, the
multiplication table would like this:
[0, 1, 2, 3, 4;
1, 1, 2, 3, 4;
2, 2, 4, 6, 8;
3, 3, 6, 9, 12;
4, 4, 8, 12, 16]
The first row and column are the ones that is the problem. How do i write this function?
Solution
First we need to generate the first row and column then generation of table can be done.
The below is the code for table generation as per the requirement.
N=input('Enter the integer value for table: ')
A=zeros(N+1,N+1);
for i=1:N+1
A(1,:)=0:N;
A(:,1)=0:N;
end
for j=2:N+1
for k=2:N+1
A(j,k)=A(1,k)*A(j,1);
end
end
A
MATLAB Write a function that takes in a number and produces an array t.docx

More Related Content

Similar to MATLAB Write a function that takes in a number and produces an array t.docx

Class 8b: Numpy & Matplotlib
Class 8b: Numpy & MatplotlibClass 8b: Numpy & Matplotlib
Class 8b: Numpy & MatplotlibMarc Gouw
 
An important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfAn important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfARORACOCKERY2111
 
ArrayBasics.ppt
ArrayBasics.pptArrayBasics.ppt
ArrayBasics.pptRaselAzam1
 
Matrices
MatricesMatrices
Matriceskja29
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lecturesmarwaeng
 
Module 4- Arrays and Strings
Module 4- Arrays and StringsModule 4- Arrays and Strings
Module 4- Arrays and Stringsnikshaikh786
 
COMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptxCOMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptximman gwu
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IVijay Kumar Gupta
 
A complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsA complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsMukesh Kumar
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsAdvanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsRay Phan
 

Similar to MATLAB Write a function that takes in a number and produces an array t.docx (20)

Class 8b: Numpy & Matplotlib
Class 8b: Numpy & MatplotlibClass 8b: Numpy & Matplotlib
Class 8b: Numpy & Matplotlib
 
2. Chap 1.pptx
2. Chap 1.pptx2. Chap 1.pptx
2. Chap 1.pptx
 
Matlab for marketing people
Matlab for marketing peopleMatlab for marketing people
Matlab for marketing people
 
An important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdfAn important part of electrical engineering is PCB design. One impor.pdf
An important part of electrical engineering is PCB design. One impor.pdf
 
introduction to matlab.pptx
introduction to matlab.pptxintroduction to matlab.pptx
introduction to matlab.pptx
 
Array Presentation
Array PresentationArray Presentation
Array Presentation
 
Matlabtut1
Matlabtut1Matlabtut1
Matlabtut1
 
Introduction to matlab
Introduction to matlabIntroduction to matlab
Introduction to matlab
 
ArrayBasics.ppt
ArrayBasics.pptArrayBasics.ppt
ArrayBasics.ppt
 
Array
ArrayArray
Array
 
Matrices
MatricesMatrices
Matrices
 
MATLAB
MATLABMATLAB
MATLAB
 
Maple
MapleMaple
Maple
 
Digital communication lab lectures
Digital communication lab  lecturesDigital communication lab  lectures
Digital communication lab lectures
 
A02
A02A02
A02
 
Module 4- Arrays and Strings
Module 4- Arrays and StringsModule 4- Arrays and Strings
Module 4- Arrays and Strings
 
COMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptxCOMPANION TO MATRICES SESSION II.pptx
COMPANION TO MATRICES SESSION II.pptx
 
Matlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - IMatlab Tutorial for Beginners - I
Matlab Tutorial for Beginners - I
 
A complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projectsA complete introduction on matlab and matlab's projects
A complete introduction on matlab and matlab's projects
 
Advanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & ScientistsAdvanced MATLAB Tutorial for Engineers & Scientists
Advanced MATLAB Tutorial for Engineers & Scientists
 

More from keshayoon3mu

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docxkeshayoon3mu
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docxkeshayoon3mu
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docxkeshayoon3mu
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docxkeshayoon3mu
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docxkeshayoon3mu
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docxkeshayoon3mu
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docxkeshayoon3mu
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docxkeshayoon3mu
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docxkeshayoon3mu
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docxkeshayoon3mu
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docxkeshayoon3mu
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docxkeshayoon3mu
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docxkeshayoon3mu
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docxkeshayoon3mu
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docxkeshayoon3mu
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docxkeshayoon3mu
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docxkeshayoon3mu
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docxkeshayoon3mu
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docxkeshayoon3mu
 

More from keshayoon3mu (20)

(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
(I have tried (9-8) & (9-10) and both were wrong) Decades of overfishi.docx
 
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
(i) Discuss the socio-economic impact of disasters in Botswana- Identi.docx
 
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
(i) PROTECTED VIEW Be careful-files from the Internet can contain viru.docx
 
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
(Hiot- The anits are inessformationg of nGiLO DNA- MichosiotoGre Labor.docx
 
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
(Figure 8 &9) 7a- How does discrete growth factor (rd) affect the popu.docx
 
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
(DuPont analysis) Dearborn Supplies has total sales of $196 million- a.docx
 
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
(Corporate income tax) Boisjoyy Productions had taxable income of $19-.docx
 
(Click on the following icon in order to copy its contents into a spr.docx
(Click on the following icon  in order to copy its contents into a spr.docx(Click on the following icon  in order to copy its contents into a spr.docx
(Click on the following icon in order to copy its contents into a spr.docx
 
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
(around 100 words summary) 20 Years of Investing Based on Academic Res.docx
 
(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx(a) What is the mediat of variable x - The median of variable x is (Re.docx
(a) What is the mediat of variable x - The median of variable x is (Re.docx
 
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
(a) Let ij-0- Show that there exists l1 such that pij(l)-0- (b) Assume.docx
 
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
(7-7) Boehm Incorporated is expected to pay a 51-50 per share dividend.docx
 
(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx(54)45(0-30)5(0-40)s4.docx
(54)45(0-30)5(0-40)s4.docx
 
(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx(5 Points) If a variable is a pointer to a structure- then which of th.docx
(5 Points) If a variable is a pointer to a structure- then which of th.docx
 
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx(5 Points) If a variable is a pointer to a float- then which of the fo.docx
(5 Points) If a variable is a pointer to a float- then which of the fo.docx
 
(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx(15pts) A-B tell the truth with probability p and lie with probability.docx
(15pts) A-B tell the truth with probability p and lie with probability.docx
 
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
(4 pts) Suppose two objects are represented by the tuples (12-0-22-6).docx
 
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx(1) What is a budgetary slack- How to ensure the integrity of performa.docx
(1) What is a budgetary slack- How to ensure the integrity of performa.docx
 
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx(1) Describe the causative organism in staphylococcus a scalded skin s.docx
(1) Describe the causative organism in staphylococcus a scalded skin s.docx
 
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
(3 pts) Suppose that a cell undergoes meiosis in a phenotypically norm.docx
 

Recently uploaded

Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityGeoBlogs
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 

Recently uploaded (20)

Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
Mattingly "AI & Prompt Design: Structured Data, Assistants, & RAG"
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
Advance Mobile Application Development class 07
Advance Mobile Application Development class 07Advance Mobile Application Development class 07
Advance Mobile Application Development class 07
 
Paris 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activityParis 2024 Olympic Geographies - an activity
Paris 2024 Olympic Geographies - an activity
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 

MATLAB Write a function that takes in a number and produces an array t.docx

  • 1. MATLAB Write a function that takes in a number and produces an array that represents the multiplication table for that number. A multiplication table is an NxN array where the first row and column of the array are the numbers from 0 to N, inclusive. The rest of the table is comprised of the products between that row number and that column number. For example, if the number is 4, the multiplication table would like this: [0, 1, 2, 3, 4; 1, 1, 2, 3, 4; 2, 2, 4, 6, 8; 3, 3, 6, 9, 12; 4, 4, 8, 12, 16] The first row and column are the ones that is the problem. How do i write this function? Solution First we need to generate the first row and column then generation of table can be done. The below is the code for table generation as per the requirement. N=input('Enter the integer value for table: ') A=zeros(N+1,N+1); for i=1:N+1 A(1,:)=0:N; A(:,1)=0:N; end for j=2:N+1 for k=2:N+1 A(j,k)=A(1,k)*A(j,1); end end A