SlideShare une entreprise Scribd logo
1  sur  2
Matlab functions:
1)sumOddInts will use a for loop to sum all the odd integers between two parameters called start
and finish, e.g. sumOddInts(5,9) -> 21
2)sumIntSquares will use a while loop to sum the squares of the integers from 1 to finish.
3) sumOddIntSquares will use a for loop to sum the odd squares of integers from start to finish,
i.e. 16 will be skipped but 25 would be added to the sum.
4 ) factorial_recurse will use recursion to compute factorial of n.
5 ) factorial_loop will use ‘ for ’ loop to compute factorial of n
Solution
Multiple Questions : Answering two,
1)
function result = sumOddInts(start,finish)
result = 0;
for i = start:finish
if (mod(i,2) != 0)
result=result+i;
end
end
end
2.
function result = sumIntSquares(finish)
result = 0;
i = 1;
while i <= finish
result=result+i*i;
i = i+1;
end
end

Contenu connexe

Similaire à Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx

MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxandreecapon
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithmsNico Ludwig
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Techglyphs
 
Unit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingUnit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingCapuchino HuiNing
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentationManchireddy Reddy
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxmonicafrancis71118
 
Java căn bản - Chapter6
Java căn bản - Chapter6Java căn bản - Chapter6
Java căn bản - Chapter6Vince Vo
 
Workshop03.docx lap trinh C cho người mới bắt đầu
Workshop03.docx  lap trinh C cho người mới bắt đầuWorkshop03.docx  lap trinh C cho người mới bắt đầu
Workshop03.docx lap trinh C cho người mới bắt đầulinhtran111111111111
 
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdfC++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdfandreaplotner1
 
algorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptxalgorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptxChSreenivasuluReddy
 

Similaire à Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx (20)

MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docxMATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
MATLAB sessions Laboratory 2MAT 275 Laboratory 2Matrix .docx
 
(1) collections algorithms
(1) collections algorithms(1) collections algorithms
(1) collections algorithms
 
Lecture 7.pptx
Lecture 7.pptxLecture 7.pptx
Lecture 7.pptx
 
C++ control loops
C++ control loopsC++ control loops
C++ control loops
 
Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1Bt0080 fundamentals of algorithms1
Bt0080 fundamentals of algorithms1
 
L06
L06L06
L06
 
Unit2 algorithmic problem_solving
Unit2 algorithmic problem_solvingUnit2 algorithmic problem_solving
Unit2 algorithmic problem_solving
 
C# Loops
C# LoopsC# Loops
C# Loops
 
B61301007 matlab documentation
B61301007 matlab documentationB61301007 matlab documentation
B61301007 matlab documentation
 
Appsec obfuscator reloaded
Appsec obfuscator reloadedAppsec obfuscator reloaded
Appsec obfuscator reloaded
 
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docxCMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
CMIS 102 Hands-On Lab Week 4OverviewThis hands-on lab all.docx
 
ICP - Lecture 9
ICP - Lecture 9ICP - Lecture 9
ICP - Lecture 9
 
pert_n_cpm.ppt
pert_n_cpm.pptpert_n_cpm.ppt
pert_n_cpm.ppt
 
pert_n_cpm.ppt
pert_n_cpm.pptpert_n_cpm.ppt
pert_n_cpm.ppt
 
Java căn bản - Chapter6
Java căn bản - Chapter6Java căn bản - Chapter6
Java căn bản - Chapter6
 
Workshop03.docx lap trinh C cho người mới bắt đầu
Workshop03.docx  lap trinh C cho người mới bắt đầuWorkshop03.docx  lap trinh C cho người mới bắt đầu
Workshop03.docx lap trinh C cho người mới bắt đầu
 
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdfC++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
C++ code only(Retrieve of Malik D., 2015, p. 742) Programming Exer.pdf
 
algorithm
algorithmalgorithm
algorithm
 
algorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptxalgorithmanalysis and effciency.pptx
algorithmanalysis and effciency.pptx
 
Lecture 3
Lecture 3Lecture 3
Lecture 3
 

Plus de maryi15

Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docxMechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docxmaryi15
 
Measurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxMeasurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxmaryi15
 
May someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxMay someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxmaryi15
 
MBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxMBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxmaryi15
 
Material Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxMaterial Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxmaryi15
 
Match the letter with each item below to indicate how net income is ad.docx
Match the letter with each item below to indicate how net income is ad.docxMatch the letter with each item below to indicate how net income is ad.docx
Match the letter with each item below to indicate how net income is ad.docxmaryi15
 
Me- The air flow in the duct is steady and uniform across the duct cr.docx
Me-  The air flow in the duct is steady and uniform across the duct cr.docxMe-  The air flow in the duct is steady and uniform across the duct cr.docx
Me- The air flow in the duct is steady and uniform across the duct cr.docxmaryi15
 
McDonnell-Myer Corporation reported net income of $1-150 million- The.docx
McDonnell-Myer Corporation reported net income of $1-150 million- The.docxMcDonnell-Myer Corporation reported net income of $1-150 million- The.docx
McDonnell-Myer Corporation reported net income of $1-150 million- The.docxmaryi15
 
Name two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxName two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxmaryi15
 
Name seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxName seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxmaryi15
 
Name some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxName some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxmaryi15
 
Name and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxName and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxmaryi15
 
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxName Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxmaryi15
 
nalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxnalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxmaryi15
 
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmyctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmaryi15
 
Mrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxMrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxmaryi15
 
Match the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxMatch the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxmaryi15
 
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxMy Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxmaryi15
 
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxMy Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxmaryi15
 
MUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxMUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxmaryi15
 

Plus de maryi15 (20)

Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docxMechanics of solids   Mechanics of solidsSolutionMechanics of solids -.docx
Mechanics of solids Mechanics of solidsSolutionMechanics of solids -.docx
 
Measurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docxMeasurements of the radioactivity of a certain isotope tell you that t.docx
Measurements of the radioactivity of a certain isotope tell you that t.docx
 
May someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docxMay someone please help me solve this problem- Thank you very much I h.docx
May someone please help me solve this problem- Thank you very much I h.docx
 
MBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docxMBO works by cascading objectives down through the organization- and t.docx
MBO works by cascading objectives down through the organization- and t.docx
 
Material Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docxMaterial Science- What are the possible effects if you add a Dopant to.docx
Material Science- What are the possible effects if you add a Dopant to.docx
 
Match the letter with each item below to indicate how net income is ad.docx
Match the letter with each item below to indicate how net income is ad.docxMatch the letter with each item below to indicate how net income is ad.docx
Match the letter with each item below to indicate how net income is ad.docx
 
Me- The air flow in the duct is steady and uniform across the duct cr.docx
Me-  The air flow in the duct is steady and uniform across the duct cr.docxMe-  The air flow in the duct is steady and uniform across the duct cr.docx
Me- The air flow in the duct is steady and uniform across the duct cr.docx
 
McDonnell-Myer Corporation reported net income of $1-150 million- The.docx
McDonnell-Myer Corporation reported net income of $1-150 million- The.docxMcDonnell-Myer Corporation reported net income of $1-150 million- The.docx
McDonnell-Myer Corporation reported net income of $1-150 million- The.docx
 
Name two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docxName two specific non-manufacturing costs that might be included in ac.docx
Name two specific non-manufacturing costs that might be included in ac.docx
 
Name seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docxName seven (7) characteristics that impact the design of a foundation-.docx
Name seven (7) characteristics that impact the design of a foundation-.docx
 
Name some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docxName some of the problems the ARC has encountered with handling donati.docx
Name some of the problems the ARC has encountered with handling donati.docx
 
Name and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docxName and briefly describe three different uses for interrupts-Solution.docx
Name and briefly describe three different uses for interrupts-Solution.docx
 
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docxName Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
Name Problem # 2 ( 2e prs ) anging not straight down- but at an angle.docx
 
nalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docxnalyze and explain why it is important for management to provide emplo.docx
nalyze and explain why it is important for management to provide emplo.docx
 
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docxmyctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
myctfitemView-offset-next&assignmentProblemID-- 103375190 Based on pos.docx
 
Mrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docxMrs- F has invited several wives of delegates to the United Nations fo.docx
Mrs- F has invited several wives of delegates to the United Nations fo.docx
 
Match the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docxMatch the Interface with its most efficient implementation- Map- TreeM.docx
Match the Interface with its most efficient implementation- Map- TreeM.docx
 
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docxMy Notes Ask Your Teach Two identical diverging lenses are separated b.docx
My Notes Ask Your Teach Two identical diverging lenses are separated b.docx
 
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docxMy Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
My Notes Ask Your Tesch away using a camera that has a lens with a foc.docx
 
MUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docxMUS101 Women made huge steps for being recognized musically in the Rom.docx
MUS101 Women made huge steps for being recognized musically in the Rom.docx
 

Dernier

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 

Dernier (20)

IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
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
 
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
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
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
 
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
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
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
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 

Matlab functions- 1)sumOddInts will use a for loop to sum all the odd.docx

  • 1. Matlab functions: 1)sumOddInts will use a for loop to sum all the odd integers between two parameters called start and finish, e.g. sumOddInts(5,9) -> 21 2)sumIntSquares will use a while loop to sum the squares of the integers from 1 to finish. 3) sumOddIntSquares will use a for loop to sum the odd squares of integers from start to finish, i.e. 16 will be skipped but 25 would be added to the sum. 4 ) factorial_recurse will use recursion to compute factorial of n. 5 ) factorial_loop will use ‘ for ’ loop to compute factorial of n Solution Multiple Questions : Answering two, 1) function result = sumOddInts(start,finish) result = 0; for i = start:finish if (mod(i,2) != 0) result=result+i; end end end 2. function result = sumIntSquares(finish) result = 0; i = 1; while i <= finish result=result+i*i;