02 atiqa ijaz khan 04
Upcoming SlideShare
Loading in...5
×
 

02 atiqa ijaz khan 04

on

  • 121 views

MATLAB, FOR loops, WHILE loops, Vectors, Matrix, IF- Else Statements

MATLAB, FOR loops, WHILE loops, Vectors, Matrix, IF- Else Statements

Statistics

Views

Total Views
121
Views on SlideShare
121
Embed Views
0

Actions

Likes
0
Downloads
3
Comments
0

0 Embeds 0

No embeds

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    02 atiqa ijaz khan 04 02 atiqa ijaz khan 04 Document Transcript

    • 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