<?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%2FArray-Functions-and-Operations%2FEnglish-timed</id>
		<title>OpenModelica/C2/Array-Functions-and-Operations/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%2FArray-Functions-and-Operations%2FEnglish-timed"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;action=history"/>
		<updated>2026-04-24T17:28:48Z</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/Array-Functions-and-Operations/English-timed&amp;diff=44089&amp;oldid=prev</id>
		<title>Sandhya.np14 at 10:16, 20 August 2018</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;diff=44089&amp;oldid=prev"/>
				<updated>2018-08-20T10:16:47Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;amp;diff=44089&amp;amp;oldid=42940&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/Array-Functions-and-Operations/English-timed&amp;diff=42940&amp;oldid=prev</id>
		<title>Pratik kamble at 11:51, 3 April 2018</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;diff=42940&amp;oldid=prev"/>
				<updated>2018-04-03T11:51:27Z</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 11:51, 3 April 2018&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 288:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 288:&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;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;|| 07:&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;30&lt;/del&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;|| 07:&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;34&lt;/ins&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;||and the third argument '''2''', represents the size of second dimension.&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;||and the third argument '''2''', represents the size of second dimension.&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>Pratik kamble</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;diff=39569&amp;oldid=prev</id>
		<title>Jyotisolanki: Created page with &quot;{| border=1 ||''' Time ''' ||'''Narration'''  |- || 00:01 || Welcome to the Spoken Tutorial on '''Array Functions and Operations'''.  |- || 00:07 || In this tutorial, we are g...&quot;</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php?title=OpenModelica/C2/Array-Functions-and-Operations/English-timed&amp;diff=39569&amp;oldid=prev"/>
				<updated>2017-10-04T09:45:00Z</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;Array Functions and Operations&amp;#039;&amp;#039;&amp;#039;.  |- || 00:07 || In this tutorial, we are g...&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 '''Array Functions and Operations'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:07&lt;br /&gt;
|| In this tutorial, we are going to learn:  how to use '''OMShell''' , how to use '''array construction functions'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:17&lt;br /&gt;
|| how to perform '''arithmetic operations''' on '''vectors''' and '''matrices'''.&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|| 00:23&lt;br /&gt;
||how to use '''array conversion functions'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:27&lt;br /&gt;
|| To record this tutorial, I am using  '''OpenModelica 1.9.2''' '''Ubuntu Operating System version 14.04''' and  '''gedit'''&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:40&lt;br /&gt;
||'''Windows''' users may use any text editor like '''Notepad''' instead of '''gedit'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 00:47&lt;br /&gt;
|| To understand and practice this tutorial, you need knowledge of '''function''' and '''array declaration''' in '''Modelica'''.&lt;br /&gt;
 &lt;br /&gt;
|-&lt;br /&gt;
|| 00:56&lt;br /&gt;
||Prerequisite tutorials are mentioned on our website. Please go through them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:02&lt;br /&gt;
|| Let us learn more about '''OMShell''' now.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:06&lt;br /&gt;
||'''OMShell''' is an interactive command line tool. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:10&lt;br /&gt;
||It is a part of '''OpenModelica'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:13&lt;br /&gt;
||'''OpenModelica compiler''' can be invoked using '''commands''' typed in '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:20&lt;br /&gt;
||It can be used for loading '''classes''' and simulating them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:25&lt;br /&gt;
||'''Functions''' can also be called in '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:29&lt;br /&gt;
|| We shall now use '''classes''' named '''polynomialEvaluatorUsingVectors''' and '''functionTester''' to demonstrate '''OMShell'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:38&lt;br /&gt;
||These '''classes''' were discussed in previous tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01:42&lt;br /&gt;
||For more information on these '''classes''', please watch the prerequisite tutorials.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||01:48&lt;br /&gt;
||All the '''commands''' to be used in this tutorial are provided in a file named '''OMShell-commands.txt'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 01:57&lt;br /&gt;
||You may locate and download all the '''code files''' available on our website. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:03&lt;br /&gt;
||Please save all these code files in one directory for easy access.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:09&lt;br /&gt;
|| Now let me launch '''OMShell'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:12&lt;br /&gt;
||To open '''OMShell''' on '''Ubuntu''' Operating System, click on '''Dash Home''' icon at top left in the launcher.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:21&lt;br /&gt;
|| Type '''OMShell''' in the search bar.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:25&lt;br /&gt;
||Click on '''OMShell''' icon. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02:28&lt;br /&gt;
||In '''Windows''', you may find the icon in '''Start''' menu.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:33&lt;br /&gt;
|| Now, let us learn a few useful commands.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:37&lt;br /&gt;
||Firstly, go to the location where you saved the text file named '''OMShell-commands.txt''' and open it. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:47&lt;br /&gt;
||Note that this file has all the '''commands''' to be used in this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 02:52&lt;br /&gt;
||Hence, you may refer to this file whenever in doubt. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||02:57&lt;br /&gt;
||Now let me switch to '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:00&lt;br /&gt;
|| Type '''cd open and close parentheses'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:05&lt;br /&gt;
||Press '''Enter''' to display the result produced on execution of the '''command'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:11&lt;br /&gt;
|| This prints the path to current directory.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||03:15&lt;br /&gt;
|| Now let us change current directory to the location where you have saved the '''code files'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:22&lt;br /&gt;
|| Let me change directory on my system.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:25&lt;br /&gt;
||Type '''cd'''(open and close parentheses) (within double quotes), specify the path. Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:38&lt;br /&gt;
|| Note that a '''Windows''' path uses '''forward slash''' unlike the '''backward slash''' used in '''Ubuntu'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:46&lt;br /&gt;
||'''Windows''' users need to be cautious of this fact.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:51&lt;br /&gt;
|| Now let us load '''polynomialEvaluatorUsingVectors''' function.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 03:57&lt;br /&gt;
||Type '''loadFile''' (within parentheses) (within double quotes) '''polynomialEvaluatorUsingVectors.mo'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||04:11&lt;br /&gt;
||Note that '''F''' is upper-case in '''loadFile()''' command.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||04:16&lt;br /&gt;
||This command can be used to load '''class''' or '''model''' files with a file extension of '''.mo'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:25&lt;br /&gt;
||Now press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:28&lt;br /&gt;
|| If the file is found, '''OMShell''' returns '''true'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:33&lt;br /&gt;
|| Now let us call this function interactively.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:37&lt;br /&gt;
||Type '''polynomialEvaluatorUsingVectors''' (with an argument of) '''10'''. Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:47&lt;br /&gt;
|| This command takes an input argument of '''10''' units and displays the result.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:55&lt;br /&gt;
|| Let me now load '''functionTester class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 04:59&lt;br /&gt;
||Type '''loadFile''' (open and close parentheses) (within double quotes) '''functionTester.mo'''. Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:12&lt;br /&gt;
|| Now let us simulate '''functionTester class'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:16&lt;br /&gt;
||Type '''simulate''' (within parentheses) '''functionTester''' (comma) '''startTime''' (equals) '''0 stopTime''' (equals) '''1'''. Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:32&lt;br /&gt;
|| The simulation is now complete.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||05:35&lt;br /&gt;
||Let us plot variable '''z''' from '''functionTester''' class.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:40&lt;br /&gt;
|| Type '''plot''' (within parentheses) (within curly braces) '''z''' and press '''Enter'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:50&lt;br /&gt;
||This command generates a plot of variable '''z''' vs '''time'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 05:56&lt;br /&gt;
|| Now let me go back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:01&lt;br /&gt;
|| '''Array construction functions''' are used to construct '''arrays''' of given size.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:06&lt;br /&gt;
||Now let us take a look at a few '''array construction functions'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:11&lt;br /&gt;
||We will also practice them using '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:15&lt;br /&gt;
||'''fill()''' is function used to create an '''array''' with all the elements same. :The syntax for '''fill''' is as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:25&lt;br /&gt;
||First '''argument''' represents the number which fills the '''array'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:29&lt;br /&gt;
||Remaining '''arguments''' represent the size of each dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:34&lt;br /&gt;
||'''zeros()''' is a function used to create an '''array''' filled with zeros. : Syntax for '''zeros()''' function is as shown. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:44&lt;br /&gt;
||'''Arguments''' represent the size of each dimension of the array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 06:50&lt;br /&gt;
||'''identity()''' function creates an identity matrix. It takes one '''argument''' that represents the size of both dimensions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:02&lt;br /&gt;
|| Now let me demonstrate these functions using '''OMShell'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:06&lt;br /&gt;
||Let me go back to '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07:09&lt;br /&gt;
|| Type '''fill'''(within parentheses)''' 5''' (comma) '''2''' (comma) '''2'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:16&lt;br /&gt;
||This command generates a two by two matrix with all its elements being '''5'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:24&lt;br /&gt;
||The first '''arguments''' represents the element to be filled within the '''array'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:30&lt;br /&gt;
||'''2''' represents the size of first dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:30&lt;br /&gt;
||and the third argument '''2''', represents the size of second dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07:40&lt;br /&gt;
||Now press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||07:43&lt;br /&gt;
||The result is as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:46&lt;br /&gt;
||Elements with one set of curly braces represent a row.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:52&lt;br /&gt;
||Hence this matrix has two rows and two columns.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 07:57&lt;br /&gt;
|| Now let us use '''zeros() function''' to create a (two by two) matrix with all its elements '''zero'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:05&lt;br /&gt;
|| Type '''zeros''' (within parentheses) '''2''' (comma)  '''2''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||08:13&lt;br /&gt;
||The result is as expected.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:16&lt;br /&gt;
|| Let us now try '''identity function'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:19&lt;br /&gt;
||Type '''identity(3)'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:23&lt;br /&gt;
||This creates an '''identity''' matrix which is '''3''' (by) '''3''' in its size.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:29&lt;br /&gt;
|| We can also perform '''arithmetic operations''' and use '''assignment statements''' in '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:36&lt;br /&gt;
||Let us create two matrices and perform '''arithmetic operations''' on them.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:42&lt;br /&gt;
|| Type '''a''' (colon) (equals) (within square brackets) '''1''' (comma) '''2''' (semicolon) '''3''' (comma) '''4'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:54&lt;br /&gt;
||'''Comma''' is used to separate elements in a row &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 08:58&lt;br /&gt;
||whereas '''semi-colon''' is used to separate rows themselves. Now press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:07&lt;br /&gt;
|| Type '''b''' (colon) (equals) '''identity (2)'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:15&lt;br /&gt;
||This generates a '''2 by 2 identity''' matrix.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:19&lt;br /&gt;
|| Now let us perform '''arithmetic operations''' on '''a''' and '''b'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:24&lt;br /&gt;
||Type '''a''' (plus) '''b''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:29&lt;br /&gt;
||This performs matrix addition.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:32&lt;br /&gt;
|| Type '''a''' (asterisk)''' b'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:36&lt;br /&gt;
||This performs matrix multiplication. Press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:42&lt;br /&gt;
|| Type '''a''' (dot) (asterisk) '''b''' and press '''Enter'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:49&lt;br /&gt;
||This performs element-wise multiplication of the two matrices.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 09:55&lt;br /&gt;
|| Note that it is not necessary to define data-types of variables used in '''OMShell'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10:02&lt;br /&gt;
|| Now let me switch back to the slides.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:06&lt;br /&gt;
|| '''Reduction functions''' take '''array''' as '''input''' and return '''scalar''' as '''output'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:13&lt;br /&gt;
||'''min()''' is a '''function''' which returns the smallest value in an '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:19&lt;br /&gt;
||Similarly, '''max() function''' returns the largest value in an '''array'''. '''sum()''' returns the sum of all elements and '''product()''' returns the product of all elements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||10:33&lt;br /&gt;
|| Let me switch to '''OMShell''' to demonstrate these functions.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:38&lt;br /&gt;
|| Let me create a new matrix.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:41&lt;br /&gt;
||'''x (colon)(equals) (within square brackets) 3 (comma) 4 (semicolon) 5 (comma) 6'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 10:52&lt;br /&gt;
|| Type '''min (x)''' to obtain the minimum value of '''x'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:00&lt;br /&gt;
|| Type '''max (x)''' to obtain the largest value in array '''x'''..&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:08&lt;br /&gt;
|| Similarly type '''sum (x)''' to obtain the sum of all elements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
||  11:15&lt;br /&gt;
|| and '''product (x)''' to obtain the product of individual elements min array '''x'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:23&lt;br /&gt;
|| Let me go back to the slides once again.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:27&lt;br /&gt;
|| Let us now discuss various other '''functions''' that take an '''array''' as '''input'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:33&lt;br /&gt;
||'''abs()''' is a '''function''' which returns an '''array''' with the '''absolute values''' of all its elements.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:40&lt;br /&gt;
||'''size()''' returns a vector with the size of each dimension.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:45&lt;br /&gt;
||'''ndims()''' returns the number of dimensions in an array.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:51&lt;br /&gt;
|| This brings us to the end of this tutorial. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 11:54&lt;br /&gt;
||In this tutorial, we used '''OMShell''' to interactively demonstrate '''array functions'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:01&lt;br /&gt;
||These '''functions''' are part of '''Modelica''' language specification. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:05&lt;br /&gt;
||Hence, they may be used while writing '''classes''' in '''OMEdit''' as well. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:11&lt;br /&gt;
|| As an assignment, apply '''abs(), '''ndims()''' and '''size() functions''' to an '''array'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:19&lt;br /&gt;
||Secondly, we have used a '''two-dimensional array''' or matrix as an '''argument''' to most of the '''functions'''. &lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:28&lt;br /&gt;
||As an assignment, implement all these '''functions''' with '''three-dimensional arrays'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:35&lt;br /&gt;
|| Watch the video available at the following link:[http://spoken-tutorial.org/ org] /What\_is\_a\_Spoken\_Tutorial&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:39&lt;br /&gt;
||Its summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:42&lt;br /&gt;
|| We conducts workshops using spoken tutorials.Give certificates. Please contact us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:48&lt;br /&gt;
|| If you have questions in this spoken tutorial, please visit the webpage mentioned.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 12:54&lt;br /&gt;
|| We coordinate coding of solved examples of popular books. Please contact us.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 13:00&lt;br /&gt;
|| We help migrate commercial simulator labs to '''OpenModelica'''.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 13:06&lt;br /&gt;
|| '''Spoken Tutorial Project''' is funded by '''NMEICT, MHRD''' Government of India.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|| 13:14&lt;br /&gt;
|| We thank the development team of '''OpenModelica''' for their support. Thank you.&lt;/div&gt;</summary>
		<author><name>Jyotisolanki</name></author>	</entry>

	</feed>