<?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=OpenModelica%2FC2%2FArrays-in-Modelica%2FEnglish-timed</id>
		<title>OpenModelica/C2/Arrays-in-Modelica/English-timed - 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=OpenModelica%2FC2%2FArrays-in-Modelica%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;action=history"/>
		<updated>2026-04-24T17:32:25Z</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=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=44088&amp;oldid=prev</id>
		<title>Sandhya.np14 at 09:03, 20 August 2018</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=44088&amp;oldid=prev"/>
				<updated>2018-08-20T09:03:02Z</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 09:03, 20 August 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 539:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 539:&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;|| 12:09&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;|| 12:09&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;|| Please watch the video available at following link: &amp;#160;&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;|| Please watch the video available at following link: &amp;#160;&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;http://spoken-tutorial.org/What_is_a_Spoken_Tutorial''' It summarizes the '''Spoken Tutorial''' project.&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;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;http://spoken-tutorial.org/What_is_a_Spoken_Tutorial''' &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&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;It summarizes the '''Spoken Tutorial''' project.&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;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;|-&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;|-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sandhya.np14</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=44087&amp;oldid=prev</id>
		<title>Sandhya.np14 at 09:01, 20 August 2018</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=44087&amp;oldid=prev"/>
				<updated>2018-08-20T09:01:48Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;amp;diff=44087&amp;amp;oldid=39532&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Sandhya.np14</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=39532&amp;oldid=prev</id>
		<title>Jyotisolanki: Created page with &quot;{| border=1 ||''' Time ''' ||'''Narration'''  |- || 00:01 || Welcome to the spoken tutorial on '''Arrays'''.  |- || 00:05 || In this tutorial, we are going to learn:  How to d...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Arrays-in-Modelica/English-timed&amp;diff=39532&amp;oldid=prev"/>
				<updated>2017-10-03T11:08:24Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;{| border=1 ||&amp;#039;&amp;#039;&amp;#039; Time &amp;#039;&amp;#039;&amp;#039; ||&amp;#039;&amp;#039;&amp;#039;Narration&amp;#039;&amp;#039;&amp;#039;  |- || 00:01 || Welcome to the spoken tutorial on &amp;#039;&amp;#039;&amp;#039;Arrays&amp;#039;&amp;#039;&amp;#039;.  |- || 00:05 || In this tutorial, we are going to learn:  How to d...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{| border=1&lt;br /&gt;
||''' Time '''&lt;br /&gt;
||'''Narration'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:01&lt;br /&gt;
|| Welcome to the spoken tutorial on '''Arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:05&lt;br /&gt;
|| In this tutorial, we are going to learn:  How to declare '''array''' variables, How to construct '''arrays''', How to use '''for''' and '''while''' loops and How to use '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:20&lt;br /&gt;
|| To record this tutorial, I am using: '''OpenModelica 1.9.2''' &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:26&lt;br /&gt;
||You may use any of the following operating systems to practice this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||00:32&lt;br /&gt;
|| To understand and practice this tutorial:You need knowledge of '''arrays''' in any programming language.&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|| 00:40&lt;br /&gt;
||You need to know how to define a '''class''' in '''Modelica'''. Prerequisite tutorials are mentioned on our website. Please go through them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:50&lt;br /&gt;
|| '''Vector''' is a one dimensional array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:53&lt;br /&gt;
||It has single index.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:55&lt;br /&gt;
||'''Syntax''' for vector declaration is as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:50&lt;br /&gt;
||The example shown declares a vector variable '''a''' whose size is '''2'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:05&lt;br /&gt;
||A '''vector''' can be constructed by including the elements in curly braces.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:11&lt;br /&gt;
||This example defines a '''vector''' parameter '''a''' with '''2''' and '''3''' as its elements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:19&lt;br /&gt;
|| To access the elements of a '''vector''', it is necessary to understand '''indexing'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:25&lt;br /&gt;
||'''Syntax''' for '''vector indexing''' is as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:29&lt;br /&gt;
||'''Vector indexing''' starts from '''1''' and '''Indices''' must be '''integers'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:35&lt;br /&gt;
|| Let us develop a '''function''' named '''polynomialEvaluatorUsingVectors'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:41&lt;br /&gt;
||This '''function''' is an extension of '''polynomialEvaluator''' function which was discussed in previous tutorials. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:49&lt;br /&gt;
||We shall replace parameters '''a,b''' and '''c''' of '''polynomialEvaluator''' with a vector '''a'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:58&lt;br /&gt;
|| Please download and save all the files available on our '''Code Files''' link. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:05&lt;br /&gt;
||For your convenience, '''polynomialEvaluator''' function is also made available.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02:12&lt;br /&gt;
|| Now let me switch to '''OMEdit''' to demonstrate this function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:17&lt;br /&gt;
||'''OMEdit''' is now open in '''Welcome''' perspective. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:21&lt;br /&gt;
||I have opened all the necessary files. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:25&lt;br /&gt;
||Note that the following classes or functions are now open in OMEdit:  '''functionTester''', &lt;br /&gt;
'''matrixAdder''',   '''polynomialEvaluator''' and    '''polynomialEvaluatorUsingVectors'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02:42&lt;br /&gt;
|| Now, to view them let me double click on each icon. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:49&lt;br /&gt;
||Let me shift the '''OMEdit''' window to the left for better visibility.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:56&lt;br /&gt;
||Go to '''polynomialEvaluator''' tab. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:00&lt;br /&gt;
||Open it in '''Text View'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:03&lt;br /&gt;
||For more information on this '''function''', refer to the previous tutorials. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:09&lt;br /&gt;
|| Let me go to '''polynomialEvaluatorUsingVectors'''. Open it in '''Text View'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:16&lt;br /&gt;
|| '''Input''' and '''output''' variables are the same as in '''polynomialEvaluator''' function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:23&lt;br /&gt;
|| Parameters '''a,b''' and '''c''' of '''polynomialEvaluator''' are replaced with a vector '''a'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03:32&lt;br /&gt;
|| Size of this vector is '''3'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03:36&lt;br /&gt;
|| The elements of this vector are included in curly braces as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:42&lt;br /&gt;
||The elements are separated by a '''comma'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:46&lt;br /&gt;
|| In the '''assignment''' statement the elements of vector '''a''' are accessed using their indices.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:54&lt;br /&gt;
||'''a[1]''' is the first element of vector '''a'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:59&lt;br /&gt;
|| Similarly, the second element and third element of vector '''a''' have been accessed as well.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:08&lt;br /&gt;
|| Now, let me switch to '''functionTester''' tab.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:13&lt;br /&gt;
||Open it in '''Text View'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:16&lt;br /&gt;
||This class is similar to the '''functionTester''' class discussed in previous tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:24&lt;br /&gt;
|| '''z''' is a Real variable.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:27&lt;br /&gt;
|| '''polynomialEvaluatorUsingVectors''' function is called with an '''input''' argument of '''10''' units.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:35&lt;br /&gt;
|| The value returned by this function is equated to '''z'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:40&lt;br /&gt;
||Now let me Simulate this class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:43&lt;br /&gt;
|| Click on '''Simulate''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:46&lt;br /&gt;
||Close the pop up window.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|04:49&lt;br /&gt;
|| Select '''z''' in the '''variables''' browser.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:53&lt;br /&gt;
||Note that the value of '''z''' is equal to '''f(x)''' at '''x = 10'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:00&lt;br /&gt;
||This plot is the same as observed in the case of '''polynomialEvaluator''' function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:07&lt;br /&gt;
||Now let me de-select '''z''' and delete the result.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:13&lt;br /&gt;
|| Go back to '''Modeling perspective'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:16&lt;br /&gt;
|| Now let me switch to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:19&lt;br /&gt;
|| '''for''' loop is used to iterate statements a given number of times.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:24&lt;br /&gt;
||It can be used in '''algorithm''' and '''equation''' sections.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:29&lt;br /&gt;
||'''Syntax''' for '''for''' loop is as shown with an example. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:34&lt;br /&gt;
|| To demonstrate how to use '''for''' loop let me go back to '''OMEdit'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:40&lt;br /&gt;
|| Click on '''polynomialEvaluatorUsingVectors''' tab.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:45&lt;br /&gt;
|| In the '''assignment''' statement for '''fx''', we are accessing the elements of vector '''a'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:52&lt;br /&gt;
||This can also be done using a '''for''' loop. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:55&lt;br /&gt;
||Now, let us see how to include a '''for''' loop in the '''algorithm''' section.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:01&lt;br /&gt;
|| Firstly, '''Comment''' the assignment statement for '''fx''' by inserting double slash at the beginning and end.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:10&lt;br /&gt;
||Save this function by pressing '''Ctrl+S'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:15&lt;br /&gt;
|| The '''for''' loop to be inserted has been provided in a text file named '''for-loop.txt'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:23&lt;br /&gt;
||It is available on our website. I have opened this file using '''gedit'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:29&lt;br /&gt;
||Windows users may use '''notepad''' or any other text editor to open it.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:35&lt;br /&gt;
|| Let me go to '''gedit'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:38&lt;br /&gt;
|| Copy all the statements by pressing '''Ctrl+C'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:44&lt;br /&gt;
||Go back to '''OMEdit'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:46&lt;br /&gt;
|| Press '''Enter'''.  Paste all the statements by pressing '''Ctrl + V'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:53&lt;br /&gt;
||Save this function by pressing '''Ctrl + S'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  06:57&lt;br /&gt;
|| Now, let me explain each statement of this loop. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  07:02&lt;br /&gt;
||This statement assigns '''fx '''an initial value of zero before the loop starts.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:09&lt;br /&gt;
|| Here, '''i''' serves as a loop counter. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:12&lt;br /&gt;
||The loop runs until value of '''i''' is '''3'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:16&lt;br /&gt;
||It is not necessary to declare '''i''' before it is used. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:21&lt;br /&gt;
||Let me scroll down a bit.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:24&lt;br /&gt;
|| This statement iteratively adds terms of the polynomial '''f(x)'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:30&lt;br /&gt;
||Polynomial '''f(x)''' has been discussed while discussing '''polynomialEvaluator''' function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:37&lt;br /&gt;
|| This statement indicates the end of '''for''' loop.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:41&lt;br /&gt;
|| Now, this function is complete.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:44&lt;br /&gt;
||To test this function let us use the class '''functionTester'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:49&lt;br /&gt;
||I have made no changes to this function to this '''class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:54&lt;br /&gt;
|| let me simulate this class by pressing '''Simulate''' button in the toolbar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:49&lt;br /&gt;
||  Select '''z''' in '''variables browser'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:03&lt;br /&gt;
||Note that the value of '''z''' remains the same after changes are made to the function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:10&lt;br /&gt;
||Let me de-select '''z''' and delete the result.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:14&lt;br /&gt;
|| Go back to '''Modeling perspective'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:17&lt;br /&gt;
|| Now let me go back to the slides once again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:21&lt;br /&gt;
|| '''while''' loop is used to iterate statements until a given condition is satisfied.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:27&lt;br /&gt;
||'''while''' loop cannot be used in '''equation''' section.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:31&lt;br /&gt;
||'''for ''' loop is more frequently used in Modelica as compared to '''while'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:37&lt;br /&gt;
|| Let us discuss '''Arrays''' now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:40&lt;br /&gt;
||'''Arrays''' are used to represent '''multi-dimensional''' data.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:44&lt;br /&gt;
||They can be constructed using '''vector''' notation.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:48&lt;br /&gt;
|| '''Syntax''' for '''array''' declaration and '''indexing''' is as shown.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:55&lt;br /&gt;
|| To understated more about '''array''' construction and '''indexing'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:00&lt;br /&gt;
||Let us write a '''class''' named '''matrixAdder''' which adds '''myMatrix''' and '''adder matrices''' to give '''mySum'''. '''myMatrix''' and '''adder matrices''' are as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:14&lt;br /&gt;
|| Now, let me switch to '''OMEdit''' to demonstrate '''matrixAdder''' class. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:19&lt;br /&gt;
||It is already open in '''OMEdit'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:23&lt;br /&gt;
|| Click on '''matrixAdder''' tab.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:26&lt;br /&gt;
||Open it in '''Text view'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||09:29&lt;br /&gt;
|| '''myMatrix''' is a '''Real''' parameter array. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:33&lt;br /&gt;
|| Numbers in square bracket represent size of this '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:39&lt;br /&gt;
||The size of first dimension is '''3'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:42&lt;br /&gt;
||Similarly, the size of second dimension is '''2'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:46&lt;br /&gt;
|| '''myMatrix''' array is constructed using three vectors of two elements each. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:53&lt;br /&gt;
|| '''{1,2}''' represents the first vector. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:57&lt;br /&gt;
|| '''{3,4}''' is the second one and &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:00&lt;br /&gt;
|| '''{5,6}}''' represents the third vector. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:04&lt;br /&gt;
||Size of each of this vectors is equal to size of second dimension of this array. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:11&lt;br /&gt;
||Hence, the size of second dimension of myMatrix is '''2'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:16&lt;br /&gt;
||The number of vectors is equal to the size of first dimension. Hence, the size of first dimension is equal to '''3'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:25&lt;br /&gt;
|| '''adder''' matrix is constructed in a similar fashion.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:29&lt;br /&gt;
|| To add this two arrays or matrices we need to access elements from two dimensions. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:35&lt;br /&gt;
||Hence '''a''' '''nested for''' loop is required.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:40&lt;br /&gt;
|| This '''for''' loop runs through the first dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:44&lt;br /&gt;
|| Similarly this '''for''' loop runs through the second dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:49&lt;br /&gt;
||Let me scroll down a bit.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:52&lt;br /&gt;
|| Corresponding elements of '''myMatrix''' and '''adder matrices''' are added to yield '''mySum'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:00&lt;br /&gt;
|| This statements represent the end of each '''for''' loop. The class is now complete.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:07&lt;br /&gt;
|| Let me simulate it by clicking on '''Simulate''' button.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:11&lt;br /&gt;
||Close the pop up window if it appears.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:15&lt;br /&gt;
||Let me expand '''variables''' column.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:18&lt;br /&gt;
||Select '''adder[1,1]''', '''myMatrix[1,1]''',  and '''mySum[1,1]'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:25&lt;br /&gt;
||Note that '''adder[1,1]''' plus '''myMatrix[1,1]''' gives '''mySum[1,1]''' which means that the result is accurate. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:35&lt;br /&gt;
||Let me de-select them and delete the result.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:40&lt;br /&gt;
|| Let me go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:43&lt;br /&gt;
|| As an assignment:  Write a function named '''vectorReversal''' to reverse the order of elements in a vector.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:51&lt;br /&gt;
||Similarly write a function '''matrixReversal''' to reverse the order of elements in each row of a matrix.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:00&lt;br /&gt;
|| Write '''functionTester''' class to test these two functions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:05&lt;br /&gt;
|| This brings us to the end of this tutorial.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:09&lt;br /&gt;
|| Please watch the video available at following link: [http://spoken-tutorial.org/ org] /What\_is\_a\_Spoken\_Tutorial''' It summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:15&lt;br /&gt;
|| We conducts workshops using spoken tutorials.Give certificates. Please contact us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:21&lt;br /&gt;
|| If you have questions related to this spoken tutorial, please visit the following website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:28&lt;br /&gt;
|| We coordinate coding of solved examples of popular books. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:33&lt;br /&gt;
||We give honorarium and certificates to those who do this.  Please visit the following website.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:39&lt;br /&gt;
|| We help migrate commercial simulator labs to OpenModelica. Please visit the following website for more information.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:48&lt;br /&gt;
|| Spoken Tutorial Project is funded by '''NMEICT, MHRD''', Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:55&lt;br /&gt;
|| We thank the development team of '''OpenModelica''' for their support.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 13:00&lt;br /&gt;
|| Thank you for joining me in this tutorial.&lt;/div&gt;</summary>
		<author><name>Jyotisolanki</name></author>	</entry>

	</feed>