SlideShare a Scribd company logo
1 of 11
Download to read offline
Atiqa Ijaz Khan Roll no. 02
1 Inst. Of Geology, PU
Assignment-4
Submitted To: Sir. Imran Ali Memon
Dated: 29th
March, 2014
Question.1:
Atiqa Ijaz Khan Roll no. 02
2 Inst. Of Geology, PU
Question 2:
Atiqa Ijaz Khan Roll no. 02
3 Inst. Of Geology, PU
Question 3:
Question 4:
Atiqa Ijaz Khan Roll no. 02
4 Inst. Of Geology, PU
Atiqa Ijaz Khan Roll no. 02
5 Inst. Of Geology, PU
Question. 5:
Atiqa Ijaz Khan Roll no. 02
6 Inst. Of Geology, PU
Question 6:
Atiqa Ijaz Khan Roll no. 02
7 Inst. Of Geology, PU
Question No.7:
Question 8:
Atiqa Ijaz Khan Roll no. 02
8 Inst. Of Geology, PU
Question 9:
What is the difference between While and For loop. Justify your answer with example.
1. FOR LOOPS: The for statement, or the for loop, is used when it is necessary to
repeat statement (s) in a script or function, and when it is known ahead of time how many
times the statements will be repeated. The statements that are repeated are called the
action of the loop.
Atiqa Ijaz Khan Roll no. 02
9 Inst. Of Geology, PU
2. WHILE LOOPS: The while statement is used as the conditional loop in matlab; it is used
to repeat an action when ahead of time it is not known how many times the action will be
repeated.
Here is a while loop which divides a number by 2 over and over until the result is less than or
equal to 1. Think "while the number is greater than 1, keep dividing." Furthermore this code only
prints the final result.
Atiqa Ijaz Khan Roll no. 02
10 Inst. Of Geology,
PU
Question. 10:
What is the difference between matrix and structure in Matlab. Justify your answer with example.
FOR MATRIX: The dimensions of Matrix is ‘r by c’, also known as 2D array. It takes only
NUMERIC data type!
FOR STRUCTURES: A structure is a data type that groups’ related data using data containers
called fields. Each field can contain data of any type or size. A struct array has the following
properties:
1. All structs in the array have the same number of fields.
2. All structs have the same field names.
3. Fields of the same name in different structs can contain different types or sizes of data.
Atiqa Ijaz Khan Roll no. 02
11 Inst. Of Geology,
PU

More Related Content

More from Atiqa khan

More from Atiqa khan (20)

2019_Wingdings Font - Times New Roman
2019_Wingdings Font  - Times New Roman2019_Wingdings Font  - Times New Roman
2019_Wingdings Font - Times New Roman
 
English Urdu Font in Windows 10 Keyboard
English Urdu Font in Windows 10 KeyboardEnglish Urdu Font in Windows 10 Keyboard
English Urdu Font in Windows 10 Keyboard
 
2018 Solutions to Sleep Screen
2018 Solutions to Sleep Screen2018 Solutions to Sleep Screen
2018 Solutions to Sleep Screen
 
2017 Thesis Check List Doc
2017 Thesis Check List Doc2017 Thesis Check List Doc
2017 Thesis Check List Doc
 
2017 Terms in GIS Town Planning
2017 Terms in GIS Town Planning2017 Terms in GIS Town Planning
2017 Terms in GIS Town Planning
 
2017 Pictorial Differences GIS & RS
2017 Pictorial Differences GIS & RS2017 Pictorial Differences GIS & RS
2017 Pictorial Differences GIS & RS
 
2017 Response Letter to a Journal
2017 Response Letter to a Journal2017 Response Letter to a Journal
2017 Response Letter to a Journal
 
2017 How to write Author Biography for Journal
2017 How to write Author Biography for Journal2017 How to write Author Biography for Journal
2017 How to write Author Biography for Journal
 
2017 Information about NUST Engineering
2017 Information about NUST Engineering2017 Information about NUST Engineering
2017 Information about NUST Engineering
 
2017 Glossary Of Cartographic Terms
2017 Glossary Of Cartographic Terms2017 Glossary Of Cartographic Terms
2017 Glossary Of Cartographic Terms
 
2017 Types Of Orbits Brief Explanation
2017 Types Of Orbits Brief Explanation2017 Types Of Orbits Brief Explanation
2017 Types Of Orbits Brief Explanation
 
2017 IST Undergraduates Admission Guide for Fall
2017 IST Undergraduates Admission Guide for Fall2017 IST Undergraduates Admission Guide for Fall
2017 IST Undergraduates Admission Guide for Fall
 
2017 Editable Thesis Checklist PDF
2017 Editable Thesis Checklist PDF2017 Editable Thesis Checklist PDF
2017 Editable Thesis Checklist PDF
 
2017 Basics of GIS
2017 Basics of GIS2017 Basics of GIS
2017 Basics of GIS
 
2016 Tenses in Research Paper
2016 Tenses in Research Paper2016 Tenses in Research Paper
2016 Tenses in Research Paper
 
Catalog of Earth Satellite Orbits_2017
Catalog of Earth Satellite Orbits_2017Catalog of Earth Satellite Orbits_2017
Catalog of Earth Satellite Orbits_2017
 
Physiology MBBS Part 2 UHS Paper-2016
Physiology MBBS Part 2 UHS Paper-2016Physiology MBBS Part 2 UHS Paper-2016
Physiology MBBS Part 2 UHS Paper-2016
 
Islamic Studies-Ethics-Pak Studies MBBS Part 2 UHS Paper-2016
Islamic Studies-Ethics-Pak Studies MBBS Part 2 UHS Paper-2016Islamic Studies-Ethics-Pak Studies MBBS Part 2 UHS Paper-2016
Islamic Studies-Ethics-Pak Studies MBBS Part 2 UHS Paper-2016
 
Bio Chemistry MBBS Part 2 UHS Paper-2016
Bio Chemistry MBBS Part 2 UHS Paper-2016Bio Chemistry MBBS Part 2 UHS Paper-2016
Bio Chemistry MBBS Part 2 UHS Paper-2016
 
Editable CD Cover Template_2016
Editable CD Cover Template_2016Editable CD Cover Template_2016
Editable CD Cover Template_2016
 

Recently uploaded

Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 

Recently uploaded (20)

Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdfUnit 3 Emotional Intelligence and Spiritual Intelligence.pdf
Unit 3 Emotional Intelligence and Spiritual Intelligence.pdf
 
Plant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptxPlant propagation: Sexual and Asexual propapagation.pptx
Plant propagation: Sexual and Asexual propapagation.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
NO1 Top Black Magic Specialist In Lahore Black magic In Pakistan Kala Ilam Ex...
 
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptxExploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
Exploring_the_Narrative_Style_of_Amitav_Ghoshs_Gun_Island.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
REMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptxREMIFENTANIL: An Ultra short acting opioid.pptx
REMIFENTANIL: An Ultra short acting opioid.pptx
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 

02 atiqa ijaz khan 04

  • 1. Atiqa Ijaz Khan Roll no. 02 1 Inst. Of Geology, PU Assignment-4 Submitted To: Sir. Imran Ali Memon Dated: 29th March, 2014 Question.1:
  • 2. Atiqa Ijaz Khan Roll no. 02 2 Inst. Of Geology, PU Question 2:
  • 3. Atiqa Ijaz Khan Roll no. 02 3 Inst. Of Geology, PU Question 3: Question 4:
  • 4. Atiqa Ijaz Khan Roll no. 02 4 Inst. Of Geology, PU
  • 5. Atiqa Ijaz Khan Roll no. 02 5 Inst. Of Geology, PU Question. 5:
  • 6. Atiqa Ijaz Khan Roll no. 02 6 Inst. Of Geology, PU Question 6:
  • 7. Atiqa Ijaz Khan Roll no. 02 7 Inst. Of Geology, PU Question No.7: Question 8:
  • 8. Atiqa Ijaz Khan Roll no. 02 8 Inst. Of Geology, PU Question 9: What is the difference between While and For loop. Justify your answer with example. 1. FOR LOOPS: The for statement, or the for loop, is used when it is necessary to repeat statement (s) in a script or function, and when it is known ahead of time how many times the statements will be repeated. The statements that are repeated are called the action of the loop.
  • 9. Atiqa Ijaz Khan Roll no. 02 9 Inst. Of Geology, PU 2. WHILE LOOPS: The while statement is used as the conditional loop in matlab; it is used to repeat an action when ahead of time it is not known how many times the action will be repeated. Here is a while loop which divides a number by 2 over and over until the result is less than or equal to 1. Think "while the number is greater than 1, keep dividing." Furthermore this code only prints the final result.
  • 10. Atiqa Ijaz Khan Roll no. 02 10 Inst. Of Geology, PU Question. 10: What is the difference between matrix and structure in Matlab. Justify your answer with example. FOR MATRIX: The dimensions of Matrix is ‘r by c’, also known as 2D array. It takes only NUMERIC data type! FOR STRUCTURES: A structure is a data type that groups’ related data using data containers called fields. Each field can contain data of any type or size. A struct array has the following properties: 1. All structs in the array have the same number of fields. 2. All structs have the same field names. 3. Fields of the same name in different structs can contain different types or sizes of data.
  • 11. Atiqa Ijaz Khan Roll no. 02 11 Inst. Of Geology, PU