<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://script.spoken-tutorial.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Scilab%2FC2%2FIteration%2FEnglish</id>
		<title>Scilab/C2/Iteration/English - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/index.php?action=history&amp;feed=atom&amp;title=Scilab%2FC2%2FIteration%2FEnglish"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;action=history"/>
		<updated>2026-05-03T05:33:27Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=11242&amp;oldid=prev</id>
		<title>PoojaMoolya at 04:30, 13 June 2014</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=11242&amp;oldid=prev"/>
				<updated>2014-06-13T04:30:29Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:30, 13 June 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Visual &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Clue&lt;/del&gt;&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Visual &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Cue&lt;/ins&gt;&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=11234&amp;oldid=prev</id>
		<title>PoojaMoolya at 04:25, 13 June 2014</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=11234&amp;oldid=prev"/>
				<updated>2014-06-13T04:25:44Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;tr style='vertical-align: top;'&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Revision as of 04:25, 13 June 2014&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Visual &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;Cue&lt;/del&gt;&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Visual &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Clue&lt;/ins&gt;&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>PoojaMoolya</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=284&amp;oldid=prev</id>
		<title>Chandrika: Created page with ''''Title of script''': Iterations  '''Author: Anuradha Amrutkar'''  '''Keywords: for loop, while loop'''    {| style=&quot;border-spacing:0;&quot; ! &lt;center&gt;Visual Cue&lt;/center&gt; ! &lt;center&gt;N…'</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=Scilab/C2/Iteration/English&amp;diff=284&amp;oldid=prev"/>
				<updated>2012-11-27T14:04:14Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;#039;&amp;#039;&amp;#039;Title of script&amp;#039;&amp;#039;&amp;#039;: Iterations  &amp;#039;&amp;#039;&amp;#039;Author: Anuradha Amrutkar&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Keywords: for loop, while loop&amp;#039;&amp;#039;&amp;#039;    {| style=&amp;quot;border-spacing:0;&amp;quot; ! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt; ! &amp;lt;center&amp;gt;N…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;'''Title of script''': Iterations&lt;br /&gt;
&lt;br /&gt;
'''Author: Anuradha Amrutkar'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: for loop, while loop'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| style=&amp;quot;border-spacing:0;&amp;quot;&lt;br /&gt;
! &amp;lt;center&amp;gt;Visual Cue&amp;lt;/center&amp;gt;&lt;br /&gt;
! &amp;lt;center&amp;gt;Narration&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Welcome to the spoken tutorial on iterative calculations using Scilab. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| I am using scilab version 5.2 in Mac operating system , but these calculations should work in other versions and also in Scilab that runs in linux and windows. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| I will use the code available in the file iteration.sce&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| I have opened this file using Scilab editor, which I plan to use only as an editor. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Let us create a vector using the colon operator. &lt;br /&gt;
&lt;br /&gt;
  i = 1:5 &lt;br /&gt;
&lt;br /&gt;
creates a vector from 1 to 5, in increments of 1. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| In this command, &lt;br /&gt;
&lt;br /&gt;
  i = 1:2:5, &lt;br /&gt;
&lt;br /&gt;
we see that the middle argument of 2 indicates the increment.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| 1 is the first argument where the vector starts. i cannot go beyond 5. It can be equal to 5, however. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Note that if the ending argument changes to 6 the result remains the same. &lt;br /&gt;
&lt;br /&gt;
  i = 1:2:6 &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| It is not difficult to explain this behaviour. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Can you think for a moment why this happens? &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We will now demonstrate the use of the for statement to perform iterative calculations. &lt;br /&gt;
&lt;br /&gt;
  for i = 1:2:7&lt;br /&gt;
     disp(i)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
This code prints out i, as we go through the loop. The display is due to the command disp - the passed argument is displayed. Recall that the for loop is used for integer values. In this case, four integer values, namely, 1, 3, 5 and 7 are displayed. The number of times the iterations take place is known as priori in for loops. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| In the rest of this tutorial, we will stick to the default increment of 1. Let us begin with the loop that displays i equal to 1 to 5. &lt;br /&gt;
&lt;br /&gt;
  for i = 1:5&lt;br /&gt;
     disp(i)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We will modify this code by introducing the break statement. &lt;br /&gt;
&lt;br /&gt;
  for i = 1:5&lt;br /&gt;
     disp(i)&lt;br /&gt;
     if (i==2),&lt;br /&gt;
        break&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Note that i is displayed only up to 2.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The iteration is not carried out till the last value of i, namely, 5. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| When i is equal to 2, the if block is executed for the first time.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The break command, however, terminates the loop. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| If we want to get out of a loop when some intermediate condition is satisfied, we can use the break statement.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Note that &amp;quot;i is equal to 2&amp;quot; statement uses the &amp;quot;equal to&amp;quot; sign twice.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| This is the standard way to compare the equality in programming languages.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The result of this comparison statement is a boolean: true or false.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We will introduce the continue statement. &lt;br /&gt;
&lt;br /&gt;
  for i = 1:5&lt;br /&gt;
     &amp;lt;nowiki&amp;gt;if (i&amp;lt;=3) then&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
        continue&lt;br /&gt;
     else&lt;br /&gt;
        disp(i)&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| This results in i getting displayed only for 4 and 5.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| &amp;lt;nowiki&amp;gt;For i less than or equal to 3, as given by the i&amp;lt;=3 statement, nothing happens. &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The continue statement makes the program skip the rest of the loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Unlike the break statement, however, it does not exit the loop. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The parameter i is incremented and all the calculations of the loop are executed for this new i. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| &amp;lt;nowiki&amp;gt;We take a small break and show how to get help for operators of the type &amp;lt;=. Let us type &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;help &amp;lt;=&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| This opens the scilab help browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstartion&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We see that the help is available under the option less. So now we type &lt;br /&gt;
&lt;br /&gt;
  help less&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We see the required help instructions here. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The for statement in Scilab is more powerful than in programming languages.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstartion&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| For example, let us perform a for loop over a vector: &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;v = [1 5 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  for x = v&lt;br /&gt;
     disp(x)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| This script displays all values of v.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Until now we have been displaying only the variables.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We can indeed display the result of a calculation as well.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The following code displays the square of the numbers. &lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;v = [1 5 3];&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
  for x = v&lt;br /&gt;
     disp(x^2)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We have spent quite a bit of time explaining the for loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Let us now move on to the while loops. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The while statement allows us to perform a loop when a boolean expression is true&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| At the beginning of the loop, if the expression is true, the statements in the body of the while loop are executed.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| If the program is written well, the expression becomes false and the loop is ended. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Now let us see an example for the while loop: &lt;br /&gt;
&lt;br /&gt;
  i = 0;&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;while(i&amp;lt;=5)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     i = i+1;&lt;br /&gt;
     disp(i)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| The values of i, from 1 to 6 are displayed. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Break and continue statements inside the while loop work exactly as they did in the for loop, as we demonstrate using break: &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Demonstration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| i = 0;&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;nowiki&amp;gt;while(i&amp;lt;=5)&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
     i = i+1;&lt;br /&gt;
     disp(i)&lt;br /&gt;
     if(i==3) then&lt;br /&gt;
        break&lt;br /&gt;
     end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| We can see that the moment i becomes equal to 3, the program exits the loop, thanks to the break statement. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Narration&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| You can also try the example for continue statement in while loop. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| This brings us to the end of this spoken tutorial on iterative calculations using Scilab.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| Spoken Tutorials are part of the Talk to a Teacher project, supported by the National Mission on Education through ICT. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:none;padding:0.0382in;&amp;quot;| Slide&lt;br /&gt;
| style=&amp;quot;border-top:none;border-bottom:0.0139in solid #000000;border-left:0.0139in solid #000000;border-right:0.0139in solid #000000;padding:0.0382in;&amp;quot;| More information on the same is available at [http://spoken-tutorial.org/NMEICT-Intro http://spoken-tutorial.org/NMEICT-Intro]. &lt;br /&gt;
&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Chandrika</name></author>	</entry>

	</feed>