'Blastoff!': While
'Blastoff!': While
while i > 0
disp(i)
i = i - 1;
end
disp('Blastoff!')
i=
Blastoff!
for a=10:10:50
for b=0:0.1:1
disp('sir syed university of engineering & technology')
end
end
[9 4 0];
[8 7 5];
= 0;
i = 1:3 % The counter is i, and the range is 1:3
sum = sum + r(i) * c(i) % This will be executed 3 times
sum =
72
sum =
100
sum =
100
P=10;
G=4;
X=[6 zeros(1,P-1)];
for K=2:P
X(K)= X(K-1)+G
end
X=
10
10
14
10
14
18
10
14
18
22
10
14
18
22
26
X=
X=
X=
X=
Z=4;
L=3;
while 1
Z=Z+L
if Z>100,break,end
end
Z=
Z=
10
Z=
13
Z=
16
Z=
19
Z=
22
Z=
25
Z=
28
Z=
31
Z=
34
Z=90;
L=3;
while 1
Z=Z+L
if Z>100,break,end
end
Z=
93
Z=
96
Z=
99
Z=
102
for a=0:50
disp('Hello World')
end
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
n = 10;
for j = 1:n
n = n-1;
j
end
j=
j=
j=
j=
j=
j=
j=
7
for a=-1:-1:-50
disp('communication system')
end
communication system
communication system
communication system
communication system
communication system
communication system
communication system
communication system
communication system
communication system
n = input('Enter a number: ');
switch n
case -1
disp('negative one')
case 0
disp('zero')
case 1
disp('positive one')
otherwise
disp('other value')
end
Enter a number: -1
negative one
Enter a number: 0
zero
Enter a number: 1
positive one
>> 9
ans =
9
for a=0:30
disp('SIGNAL & SYSTEMS')
end