<?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/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Utkarsha</id>
		<title>Script | Spoken-Tutorial - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="https://script.spoken-tutorial.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Utkarsha"/>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Special:Contributions/Utkarsha"/>
		<updated>2026-04-09T07:43:12Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.23.17</generator>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:57:10Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, delete, Scilab, Parametric equation, Circle, 2D, Text box, Axes, callback function, Tag, String'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''2D''' parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plot the Parametric equation of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''delete''' function.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
&lt;br /&gt;
The Parametric Equation of a circle is x = r*cos(Θ) and y = r*sin(Θ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''' &amp;amp;amp; '''y''' are the coordinates for a given point on the circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the circle.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these two '''equations''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Slider?'''&lt;br /&gt;
|'''What is a Slider?'''&lt;br /&gt;
&lt;br /&gt;
'''Slider''' is an object that allows the user to dynamically change the value of a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
It allows the user to move an indicator horizontally to set new values.&lt;br /&gt;
&lt;br /&gt;
The user can also alter the values by clicking on any point on the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a delete function?'''&lt;br /&gt;
|'''What is a delete function?'''&lt;br /&gt;
&lt;br /&gt;
The '''delete''' function is used to delete the '''graphical response'''.&lt;br /&gt;
&lt;br /&gt;
The '''object’s''' '''handle''' whose response is to be deleted, is passed as an '''argument'''.&lt;br /&gt;
&lt;br /&gt;
Syntax: '''delete(&amp;amp;lt;handle of an object&amp;amp;gt;)'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting2dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Let us look at how to use a '''Slider''' to plot a circle with varying radii.&lt;br /&gt;
&lt;br /&gt;
I have opened the '''plotting2dcurves.sce''' file using the '''GUIBuilder toolbox'''.&lt;br /&gt;
&lt;br /&gt;
Now let us look at the '''objects''' that are taken on this graphic window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
We have a '''Text''' box with the '''Tag''' '''‘txt_radius'''’ and the '''String''' part is kept empty.&lt;br /&gt;
&lt;br /&gt;
Hence, a default value '''UnName1''' is assigned to it as '''String.'''&lt;br /&gt;
&lt;br /&gt;
The '''Text''' box will display the exact value of the radius that the '''Slider''' has selected.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
We also have an '''Axes''' with the '''Tag''' '''‘ax_radius’''' and the '''String''' as ‘'''Circle'''’.&lt;br /&gt;
&lt;br /&gt;
This will display the '''response''' of the circle.&lt;br /&gt;
|-&lt;br /&gt;
| Only narration&lt;br /&gt;
| Now let us add a '''Slider''' to control the radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette,'''&lt;br /&gt;
&lt;br /&gt;
click on the '''Slider'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder''' '''Palette''', click on the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window appears.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''sl_radius''''' in '''Tag''' field.&lt;br /&gt;
&lt;br /&gt;
Type '''''Radius''''' in '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''''sl_radius''''' in the '''Tag''' field and '''''Radius''''' in the '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Close the window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
| Now place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
move the indicator on the '''Slider''' horizontally.&lt;br /&gt;
|&lt;br /&gt;
Then move the '''Slider''' indicator horizontally to vary the value.&lt;br /&gt;
&lt;br /&gt;
However, we find that we are unable to move the indicator.&lt;br /&gt;
&lt;br /&gt;
We must first enable the '''Slider''' to do so. Let us do that.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on the right side panel.&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''' and look at the right side panel.&lt;br /&gt;
&lt;br /&gt;
It displays a list of '''Tag''' names for the objects on the '''Graphic''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''sl_radius'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''Object Properties'''.&lt;br /&gt;
|&lt;br /&gt;
Click on '''sl_radius.'''&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Object Properties''' button at the bottom right of the window.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window will open.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
hover over '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
change '''Enable''' property to ‘'''on'''’.&lt;br /&gt;
|&lt;br /&gt;
Search for the object property '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
Change it from '''Off''' to '''On'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Max''' field.&lt;br /&gt;
&lt;br /&gt;
Change the value from '''1 to 10'''.&lt;br /&gt;
|&lt;br /&gt;
We also have to change one more object property which is ''''Max''''.&lt;br /&gt;
&lt;br /&gt;
This property will set the upper limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
Change it from '''1''' to '''10'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Min''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Notice the object property ''''Min'''' which is lower limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
It is always set to '''0,''' by default.&lt;br /&gt;
&lt;br /&gt;
Now, let us vary the value of the radius using the '''Slider''' from '''0 to 10'''.&lt;br /&gt;
&lt;br /&gt;
Let us save the changes by clicking on the '''OK''' button at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover cursor over the '''Graphic Window Number 1'''.&lt;br /&gt;
|&lt;br /&gt;
Now, I will generate the '''Scilab''' code for the same.&lt;br /&gt;
&lt;br /&gt;
In the code file, we will write the code to connect the '''Slider''' and the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result, the '''Text''' box will display the exact value of the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
We will also write a '''user-defined''' function to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''Generate,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' click on the '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-2d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-2d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
A '''dialog''' box appears and displays the message “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''SciNotes''' Window.&lt;br /&gt;
| The corresponding '''Scilab''' code opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.ax_radius'''.&lt;br /&gt;
| '''handles.ax_radius''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on '''sl_radius_callback''' Function.&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a function definition for '''sl_radius_callback''' function.&lt;br /&gt;
&lt;br /&gt;
The function will basically link the '''Text''' box and the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''SciNotes''' window,&lt;br /&gt;
&lt;br /&gt;
within '''sl_radius_callback''' type,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the code as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
The same code can be found in a file in the '''Code files''' section on this video page.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius.string = string(handles.sl_radius.value)'''&lt;br /&gt;
| This line will assign the value of the '''Slider''' to the '''Text''' box'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''r = strtod(handles.txt_radius.string)'''&lt;br /&gt;
|&lt;br /&gt;
Next, we will assign the radius value from the '''Text''' box to a variable '''‘r’.'''&lt;br /&gt;
&lt;br /&gt;
Later on, we can use the variable '''‘r'''’ while writing the equation of a circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
cursor on new line outside the '''sl_radius_callback''' function, type,&lt;br /&gt;
&lt;br /&gt;
'''''function &amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()'''''&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;plot&amp;lt;/u&amp;gt;(x,y)'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Further, we will write a '''user defined''' function '''plot_circle()''' to plot the circle.&lt;br /&gt;
&lt;br /&gt;
Type the code in the same way as before, with the same syntax.&lt;br /&gt;
&lt;br /&gt;
This can also be found in the '''Code files''' section.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
|&lt;br /&gt;
First, we have defined the range of '''theta'''.&lt;br /&gt;
&lt;br /&gt;
It will vary from '''0 to 4𝝅''' with a step size of '''0.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
| The next two lines define the parametric equation of the circle in terms of '''x''' and '''y'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''plot(x,y)'''&lt;br /&gt;
| The following line will plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| The next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Inside the '''sl_radius_callback Function''' type,&lt;br /&gt;
&lt;br /&gt;
'''plot_circle()'''&lt;br /&gt;
|&lt;br /&gt;
Let us call the '''plot_circle()''' function inside the callback function.&lt;br /&gt;
&lt;br /&gt;
At the end of the '''sl_radius_callback''' function definition, type '''plot_circle()'''&lt;br /&gt;
&lt;br /&gt;
As a result, when we move the '''Slider''', the circle is plotted for each radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
press '''Ctrl''' + '''S.'''&lt;br /&gt;
| Let us save the code by pressing '''Ctrl''' + '''S''' keys together on the keyboard.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''' Button on '''menubar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
We will now execute the code.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute''' button on the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
hover over '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the right side'''.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us move the indicator given on the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
We can see that as we move the indicator, a circle is being plotted.&lt;br /&gt;
&lt;br /&gt;
Notice the '''Text''' box. The value of the radius is also getting changed along with it.&lt;br /&gt;
&lt;br /&gt;
Moving the indicator towards the right increases the radius.&lt;br /&gt;
&lt;br /&gt;
And moving the indicator towards the left decreases the radius.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
But, the earlier responses are still visible.&lt;br /&gt;
&lt;br /&gt;
Let us delete them by adding a single line.&lt;br /&gt;
&lt;br /&gt;
This line is to be written at the start of '''plot_circle() function''' definition'''.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Type within '''''&amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()''''' function and then highlight,&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_radius.children)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the line as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
This line deletes all the '''children''' of the current '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Here, '''children''' refers to the '''subplot''' of the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save the work by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
| Let us go back to the '''menu bar''' and click on '''Execute''' and then click on '''File with echo'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2,'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator to the right and then on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Now move the '''Slider''' indicator to the right and then to the left.&lt;br /&gt;
&lt;br /&gt;
The earlier responses are now deleted and no longer visible.&lt;br /&gt;
&lt;br /&gt;
So, in this way we can build a '''GUI''' for plotting a '''2D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the Parametric equation of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''delete''' function.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create a '''GUI''' to plot a '''Parabola''' using its parametric equations,&amp;lt;br&amp;gt;y = a*(t)^2, x = 2*a*t.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change ''''a'''' from '''-1 to 1''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider, ''''t'''' varies from '''-10''' to '''10'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add grid lines to the plot and label the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;We conduct workshops using '''Spoken Tutorials''' and give certificates.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please contact us.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please post your timed queries in this forum.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:50:14Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D''' parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;To plot the parametric equation of a sphere using '''GUI.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''surf '''command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''mesh''' command and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''meshgrid''' command&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
&lt;br /&gt;
The parametric equation of a sphere is:&amp;lt;br&amp;gt;&lt;br /&gt;
x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''', '''y, z''' are the cartesian coordinates of a given point on the sphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the sphere and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''theta''' &amp;amp;amp; '''phi''' are the spherical coordinates. They lie in the range '''0''' to '''2𝞹'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf''' and '''mesh''' commands in this tutorial.&lt;br /&gt;
&lt;br /&gt;
These commands are used to create a '''3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
The '''surf''' command draws a '''3D''' parametric surface plot.&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf''' command will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
The '''mesh''' command also draws a '''3D''' parametric surface plot.&lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh''' command will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf''' commands type the following on the '''Scilab console''':&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce''' file in the saved folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’''' and '''String ‘Radius’.'''&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Next, we have a '''Text''' box to display the radius.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’''' and the '''String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes''' to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog box that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback''' function definition.&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider''' to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a user-defined function '''plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete''' function to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid''' command is used.&lt;br /&gt;
&lt;br /&gt;
It is used to generate '''u''' and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and '''theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric equation in terms of '''x, y''' and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
| Only narration&lt;br /&gt;
| Next, we will plot a '''3D''' parametric curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf''' command.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
type,&lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere()''' function inside the '''callback''' function.&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback''' function definition type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the indicator on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
The '''surf''' command now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf''' command to comment it out.&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh''' command to now see its output.&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
| Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh''' command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
| Only narration&lt;br /&gt;
| So this way we can build a '''GUI''' for plotting a '''3D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the parametric equation of a sphere using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''surf''' command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''mesh''' command and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''meshgrid''' command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Using '''surf''' and '''mesh''', build a '''GUI''' to plot a '''3D''' hemisphere.&amp;lt;br&amp;gt;Parametric equations: x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ).&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Place the hemisphere on a horizontal plane.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change radius ‘'''r'''’ from '''1''' to '''10''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider that '''theta''' &amp;amp;amp; '''phi''' vary from '''0''' to '''𝞹.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add '''grid lines''' to the plot and '''label''' the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:47:21Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D''' parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;To plot the parametric equation of a sphere using '''GUI.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''surf '''command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''mesh''' command and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''meshgrid''' command&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
&lt;br /&gt;
The parametric equation of a sphere is:&amp;lt;br&amp;gt;&lt;br /&gt;
x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''', '''y, z''' are the cartesian coordinates of a given point on the sphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the sphere and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''theta''' &amp;amp;amp; '''phi''' are the spherical coordinates. They lie in the range '''0''' to '''2𝞹'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf''' and '''mesh''' commands in this tutorial.&lt;br /&gt;
&lt;br /&gt;
These commands are used to create a '''3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
The '''surf''' command draws a '''3D''' parametric surface plot.&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf''' command will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
The '''mesh''' command also draws a '''3D''' parametric surface plot.&lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh''' command will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf''' commands type the following on the '''Scilab console''':&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce''' file in the saved folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’''' and '''String ‘Radius’.'''&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Next, we have a '''Text''' box to display the radius.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’''' and the '''String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes''' to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog box that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback''' function definition.&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider''' to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a user-defined function '''plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete''' function to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid''' command is used.&lt;br /&gt;
&lt;br /&gt;
It is used to generate '''u''' and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and '''theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric equation in terms of '''x, y''' and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Next, we will plot a '''3D''' parametric curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf''' command.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
type,&lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere()''' function inside the '''callback''' function.&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback''' function definition type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the indicator on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
The '''surf''' command now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf''' command to comment it out.&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh''' command to now see its output.&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
| Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh''' command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| So this way we can build a '''GUI''' for plotting a '''3D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the parametric equation of a sphere using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''surf''' command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''mesh''' command and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''meshgrid''' command.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Using '''surf''' and '''mesh''', build a '''GUI''' to plot a '''3D''' hemisphere.&amp;lt;br&amp;gt;Parametric equations: x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ).&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Place the hemisphere on a horizontal plane.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change radius ‘'''r'''’ from '''1''' to '''10''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider that '''theta''' &amp;amp;amp; '''phi''' vary from '''0''' to '''𝞹.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add '''grid lines''' to the plot and '''label''' the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:33:54Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D parametric curves'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;To plot the '''parametric''' equation of a sphere using '''GUI.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''meshgrid command'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
&lt;br /&gt;
The '''parametric equation''' of a sphere is:&amp;lt;br&amp;gt;&lt;br /&gt;
x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''', '''y, z''' are the '''cartesian coordinates''' of a given point on the sphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the sphere and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''theta''' &amp;amp;amp; '''phi''' are the '''spherical coordinates'''. They lie in the range '''0''' to '''2𝞹'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf''' and '''mesh''' commands in this tutorial.&lt;br /&gt;
&lt;br /&gt;
These '''commands''' are used to create a '''3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf command''' will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
The '''mesh command''' also draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh command''' will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf commands''' type the following on the '''Scilab console''':&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce''' file in the saved folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’''' and '''String ‘Radius’.'''&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Next, we have a '''Text''' box to display the radius.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’''' and the '''String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes''' to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog box that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback function''' definition.&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider''' to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a '''user-defined function plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete function''' to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid command''' is used.&lt;br /&gt;
&lt;br /&gt;
It is used to generate '''u''' and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and '''theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric equation in terms of '''x, y''' and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Next, we will plot a '''3D parametric''' curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf command'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
type,&lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere() function''' inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback function''' definition type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the '''indicator''' on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf''' command to comment it out.&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh''' command to now see its output.&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
| Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh''' command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| So this way we can build a '''GUI''' for plotting a '''3D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''parametric''' equation of a sphere using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''meshgrid command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Using '''surf''' and '''mesh''', build a '''GUI''' to plot a '''3D''' hemisphere.&amp;lt;br&amp;gt;Parametric equations: x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ).&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Place the hemisphere on a horizontal plane.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change radius ‘'''r'''’ from '''1''' to '''10''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider that '''theta''' &amp;amp;amp; '''phi''' vary from '''0''' to '''𝞹.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add '''grid lines''' to the plot and '''label''' the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:33:09Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D parametric curves'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;To plot the '''parametric''' equation of a sphere using '''GUI.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''meshgrid command'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
&lt;br /&gt;
The '''parametric equation''' of a sphere is:&amp;lt;br&amp;gt;&lt;br /&gt;
x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''', '''y, z''' are the '''cartesian coordinates''' of a given point on the sphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the sphere and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''theta''' &amp;amp;amp; '''phi''' are the '''spherical coordinates'''. They lie in the range '''0''' to '''2𝞹'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf''' and '''mesh''' commands in this tutorial.&lt;br /&gt;
&lt;br /&gt;
These '''commands''' are used to create a '''3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf command''' will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
The '''mesh command''' also draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh command''' will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf commands''' type the following on the '''Scilab console''':&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting3dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce''' file in the saved folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: sl_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’''' and '''String ‘Radius’.'''&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
Next, we have a '''Text''' box to display the radius.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’''' and the '''String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_plot, String: Sphere”&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes''' to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog box that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback function''' definition.&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider''' to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a '''user-defined function plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete function''' to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid command''' is used.&lt;br /&gt;
&lt;br /&gt;
It is used to generate '''u''' and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and '''theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric equation in terms of '''x, y''' and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Next, we will plot a '''3D parametric''' curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf command'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
type,&lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere() function''' inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback function''' definition type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the '''indicator''' on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf''' command to comment it out.&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh''' command to now see its output.&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
| Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh''' command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| So this way we can build a '''GUI''' for plotting a '''3D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''parametric''' equation of a sphere using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''meshgrid command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Using '''surf''' and '''mesh''', build a '''GUI''' to plot a '''3D''' hemisphere.&amp;lt;br&amp;gt;Parametric equations: x = r*cos(θ)*sin(φ) , y = r*sin(θ)*sin(φ) &amp;amp; z = r*cos(φ).&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Place the hemisphere on a horizontal plane.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change radius ‘'''r'''’ from '''1''' to '''10''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider that '''theta''' &amp;amp;amp; '''phi''' vary from '''0''' to '''𝞹.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add '''grid lines''' to the plot and '''label''' the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:05:35Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, delete, Scilab, Parametric equation, Circle, 2D, Text box, Axes, callback function, Tag, String'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting 2D parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plot the '''Parametric equation''' of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
&lt;br /&gt;
The '''Parametric Equation''' of a circle is x = r*cos(Θ) and y = r*sin(Θ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''' &amp;amp;amp; '''y''' are the coordinates for a given point on the circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the circle.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these two '''equations''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Slider?'''&lt;br /&gt;
|'''What is a Slider?'''&lt;br /&gt;
&lt;br /&gt;
'''Slider''' is an object that allows the user to dynamically change the value of a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
It allows the user to move an indicator horizontally to set new values.&lt;br /&gt;
&lt;br /&gt;
The user can also alter the values by clicking on any point on the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a delete function?'''&lt;br /&gt;
|'''What is a delete function?'''&lt;br /&gt;
&lt;br /&gt;
The '''delete''' function is used to delete the '''graphical response'''.&lt;br /&gt;
&lt;br /&gt;
The '''object’s''' '''handle''' whose response is to be deleted, is passed as an '''argument'''.&lt;br /&gt;
&lt;br /&gt;
Syntax: '''delete(&amp;amp;lt;handle of an object&amp;amp;gt;)'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting2dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
Let us look at how to use a '''Slider''' to plot a circle with varying radii.&lt;br /&gt;
&lt;br /&gt;
I have opened the '''plotting2dcurves.sce''' file using the '''GUIBuilder toolbox'''.&lt;br /&gt;
&lt;br /&gt;
Now let us look at the '''objects''' that are taken on this graphic window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
We have a '''Text''' box with the '''Tag''' '''‘txt_radius'''’ and the '''String''' part is kept empty.&lt;br /&gt;
&lt;br /&gt;
Hence, a default value '''UnName1''' is assigned to it as '''String.'''&lt;br /&gt;
&lt;br /&gt;
The '''Text''' box will display the exact value of the radius that the '''Slider''' has selected.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
We also have an '''Axes''' with the '''Tag''' '''‘ax_radius’''' and the '''String''' as ‘'''Circle'''’.&lt;br /&gt;
&lt;br /&gt;
This will display the '''response''' of the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Now let us add a '''Slider''' to control the radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette,'''&lt;br /&gt;
&lt;br /&gt;
click on the '''Slider'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder''' '''Palette''', click on the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window appears.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''sl_radius''''' in '''Tag''' field.&lt;br /&gt;
&lt;br /&gt;
Type '''''Radius''''' in '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''''sl_radius''''' in the '''Tag''' field and '''''Radius''''' in the '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Close the window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
| Now place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
move the indicator on the '''Slider''' horizontally.&lt;br /&gt;
|&lt;br /&gt;
Then move the '''Slider''' indicator horizontally to vary the value.&lt;br /&gt;
&lt;br /&gt;
However, we find that we are unable to move the indicator.&lt;br /&gt;
&lt;br /&gt;
We must first enable the '''Slider''' to do so. Let us do that.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on the right side panel.&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''' and look at the right side panel.&lt;br /&gt;
&lt;br /&gt;
It displays a list of '''Tag''' names for the objects on the '''Graphic''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''sl_radius'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''Object Properties'''.&lt;br /&gt;
|&lt;br /&gt;
Click on '''sl_radius.'''&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Object Properties''' button at the bottom right of the window.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window will open.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
hover over '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
change '''Enable''' property to ‘'''on'''’.&lt;br /&gt;
|&lt;br /&gt;
Search for the object property '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
Change it from '''Off''' to '''On'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Max''' field.&lt;br /&gt;
&lt;br /&gt;
Change the value from '''1 to 10'''.&lt;br /&gt;
|&lt;br /&gt;
We also have to change one more object property which is ''''Max''''.&lt;br /&gt;
&lt;br /&gt;
This property will set the upper limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
Change it from '''1''' to '''10'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Min''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Notice the object property ''''Min'''' which is lower limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
It is always set to '''0,''' by default.&lt;br /&gt;
&lt;br /&gt;
Now, let us vary the value of the radius using the '''Slider''' from '''0 to 10'''.&lt;br /&gt;
&lt;br /&gt;
Let us save the changes by clicking on the '''OK''' button at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover cursor over the '''Graphic Window Number 1'''.&lt;br /&gt;
|&lt;br /&gt;
Now, I will generate the '''Scilab''' code for the same.&lt;br /&gt;
&lt;br /&gt;
In the code file, we will write the code to connect the '''Slider''' and the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result, the '''Text''' box will display the exact value of the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
We will also write a '''user-defined function''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''Generate,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' click on the '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-2d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-2d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
A '''dialog''' box appears and displays the message “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''SciNotes''' Window.&lt;br /&gt;
| The corresponding '''Scilab''' code opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.ax_radius'''.&lt;br /&gt;
| '''handles.ax_radius''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on '''sl_radius_callback''' Function.&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a function definition for '''sl_radius_callback''' function.&lt;br /&gt;
&lt;br /&gt;
The function will basically link the '''Text''' box and the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''SciNotes''' window,&lt;br /&gt;
&lt;br /&gt;
within '''sl_radius_callback''' type,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found in a file in the '''Code files''' section on this video page.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius.string = string(handles.sl_radius.value)'''&lt;br /&gt;
| This line will assign the value of the '''Slider''' to the '''Text''' box'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''r = strtod(handles.txt_radius.string)'''&lt;br /&gt;
|&lt;br /&gt;
Next, we will assign the radius value from the '''Text''' box to a '''variable ‘r’.'''&lt;br /&gt;
&lt;br /&gt;
Later on, we can use the '''variable ‘r'''’ while writing the equation of a circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
cursor on new line outside the '''sl_radius_callback''' function, type,&lt;br /&gt;
&lt;br /&gt;
'''''function &amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()'''''&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;plot&amp;lt;/u&amp;gt;(x,y)'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Further, we will write a '''user defined function plot_circle()''' to plot the circle.&lt;br /&gt;
&lt;br /&gt;
Type the code in the same way as before, with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
This can also be found in the '''Code files''' section.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
|&lt;br /&gt;
First, we have defined the range of '''theta'''.&lt;br /&gt;
&lt;br /&gt;
It will vary from '''0 to 4𝝅''' with a step size of '''0.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
| The next two lines define the '''parametric equation''' of the circle in terms of '''x''' and '''y'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''plot(x,y)'''&lt;br /&gt;
| The following line will plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| The next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Inside the '''sl_radius_callback Function''' type,&lt;br /&gt;
&lt;br /&gt;
'''plot_circle()'''&lt;br /&gt;
|&lt;br /&gt;
Let us call the '''plot_circle()''' function inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of the '''sl_radius_callback''' function definition, type '''plot_circle()'''&lt;br /&gt;
&lt;br /&gt;
As a result, when we move the '''Slider''', the circle is plotted for each radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
press '''Ctrl''' + '''S.'''&lt;br /&gt;
| Let us save the code by pressing '''Ctrl''' + '''S''' keys together on the keyboard.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''' Button on '''menubar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
We will now execute the code.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute''' button on the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
hover over '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the right side'''.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us move the indicator given on the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
We can see that as we move the indicator, a circle is being plotted.&lt;br /&gt;
&lt;br /&gt;
Notice the '''Text''' box. The value of the radius is also getting changed along with it.&lt;br /&gt;
&lt;br /&gt;
Moving the indicator towards the right increases the radius.&lt;br /&gt;
&lt;br /&gt;
And moving the indicator towards the left decreases the radius.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
But, the earlier responses are still visible.&lt;br /&gt;
&lt;br /&gt;
Let us delete them by adding a single line.&lt;br /&gt;
&lt;br /&gt;
This line is to be written at the start of '''plot_circle() function''' definition'''.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Type within '''''&amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()''''' function and then highlight,&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_radius.children)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the line as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
This line deletes all the '''children''' of the current '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Here, '''children''' refers to the '''subplot''' of the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save the work by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
| Let us go back to the '''menu bar''' and click on '''Execute''' and then click on '''File with echo'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2,'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator to the right and then on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Now move the '''Slider''' indicator to the right and then to the left.&lt;br /&gt;
&lt;br /&gt;
The earlier responses are now deleted and no longer visible.&lt;br /&gt;
&lt;br /&gt;
So, in this way we can build a '''GUI''' for plotting a '''2D parametric''' curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''Parametric''' equation of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create a '''GUI''' to plot a '''Parabola''' using its '''parametric equations''',&amp;lt;br&amp;gt;y = a*(t)^2, x = 2*a*t.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change ''''a'''' from '''-1 to 1''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider, ''''t'''' varies from '''-10''' to '''10'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add grid lines to the plot and label the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;We conduct workshops using '''Spoken Tutorials''' and give certificates.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please contact us.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please post your timed queries in this forum.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-20T03:03:37Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, delete, Scilab, Parametric equation, Circle, 2D, Text box, Axes, callback function, Tag, String'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting 2D parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plot the '''Parametric equation''' of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
|'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
&lt;br /&gt;
The '''Parametric Equation''' of a circle is x = r*cos(Θ) and y = r*sin(Θ)'''.'''&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''' &amp;amp;amp; '''y''' are the coordinates for a given point on the circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the circle.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these two '''equations''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Slider?'''&lt;br /&gt;
|'''What is a Slider?'''&lt;br /&gt;
&lt;br /&gt;
'''Slider''' is an object that allows the user to dynamically change the value of a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
It allows the user to move an indicator horizontally to set new values.&lt;br /&gt;
&lt;br /&gt;
The user can also alter the values by clicking on any point on the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a delete function?'''&lt;br /&gt;
|'''What is a delete function?'''&lt;br /&gt;
&lt;br /&gt;
The '''delete''' function is used to delete the '''graphical response'''.&lt;br /&gt;
&lt;br /&gt;
The '''object’s''' '''handle''' whose response is to be deleted, is passed as an '''argument'''.&lt;br /&gt;
&lt;br /&gt;
Syntax: '''delete(&amp;amp;lt;handle of an object&amp;amp;gt;)'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting2dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting2dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Let us look at how to use a '''Slider''' to plot a circle with varying radii.&lt;br /&gt;
&lt;br /&gt;
I have opened the '''plotting2dcurves.sce''' file using the '''GUIBuilder toolbox'''.&lt;br /&gt;
&lt;br /&gt;
Now let us look at the '''objects''' that are taken on this graphic window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius”&lt;br /&gt;
|&lt;br /&gt;
We have a '''Text''' box with the '''Tag''' '''‘txt_radius'''’ and the '''String''' part is kept empty.&lt;br /&gt;
&lt;br /&gt;
Hence, a default value '''UnName1''' is assigned to it as '''String.'''&lt;br /&gt;
&lt;br /&gt;
The '''Text''' box will display the exact value of the radius that the '''Slider''' has selected.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_radius, String:Circle”&lt;br /&gt;
|&lt;br /&gt;
We also have an '''Axes''' with the '''Tag''' '''‘ax_radius’''' and the '''String''' as ‘'''Circle'''’.&lt;br /&gt;
&lt;br /&gt;
This will display the '''response''' of the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Now let us add a '''Slider''' to control the radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette,'''&lt;br /&gt;
&lt;br /&gt;
click on the '''Slider'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder''' '''Palette''', click on the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window appears.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''sl_radius''''' in '''Tag''' field.&lt;br /&gt;
&lt;br /&gt;
Type '''''Radius''''' in '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''''sl_radius''''' in the '''Tag''' field and '''''Radius''''' in the '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Close the window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
| Now place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
move the indicator on the '''Slider''' horizontally.&lt;br /&gt;
|&lt;br /&gt;
Then move the '''Slider''' indicator horizontally to vary the value.&lt;br /&gt;
&lt;br /&gt;
However, we find that we are unable to move the indicator.&lt;br /&gt;
&lt;br /&gt;
We must first enable the '''Slider''' to do so. Let us do that.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on the right side panel.&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''' and look at the right side panel.&lt;br /&gt;
&lt;br /&gt;
It displays a list of '''Tag''' names for the objects on the '''Graphic''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''sl_radius'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''Object Properties'''.&lt;br /&gt;
|&lt;br /&gt;
Click on '''sl_radius.'''&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Object Properties''' button at the bottom right of the window.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window will open.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
hover over '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
change '''Enable''' property to ‘'''on'''’.&lt;br /&gt;
|&lt;br /&gt;
Search for the object property '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
Change it from '''Off''' to '''On'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Max''' field.&lt;br /&gt;
&lt;br /&gt;
Change the value from '''1 to 10'''.&lt;br /&gt;
|&lt;br /&gt;
We also have to change one more object property which is ''''Max''''.&lt;br /&gt;
&lt;br /&gt;
This property will set the upper limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
Change it from '''1''' to '''10'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Min''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Notice the object property ''''Min'''' which is lower limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
It is always set to '''0,''' by default.&lt;br /&gt;
&lt;br /&gt;
Now, let us vary the value of the radius using the '''Slider''' from '''0 to 10'''.&lt;br /&gt;
&lt;br /&gt;
Let us save the changes by clicking on the '''OK''' button at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover cursor over the '''Graphic Window Number 1'''.&lt;br /&gt;
|&lt;br /&gt;
Now, I will generate the '''Scilab''' code for the same.&lt;br /&gt;
&lt;br /&gt;
In the code file, we will write the code to connect the '''Slider''' and the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result, the '''Text''' box will display the exact value of the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
We will also write a '''user-defined function''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''Generate,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' click on the '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-2d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-2d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
A '''dialog''' box appears and displays the message “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''SciNotes''' Window.&lt;br /&gt;
| The corresponding '''Scilab''' code opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.ax_radius'''.&lt;br /&gt;
| '''handles.ax_radius''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on '''sl_radius_callback''' Function.&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a function definition for '''sl_radius_callback''' function.&lt;br /&gt;
&lt;br /&gt;
The function will basically link the '''Text''' box and the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''SciNotes''' window,&lt;br /&gt;
&lt;br /&gt;
within '''sl_radius_callback''' type,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found in a file in the '''Code files''' section on this video page.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius.string = string(handles.sl_radius.value)'''&lt;br /&gt;
| This line will assign the value of the '''Slider''' to the '''Text''' box'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''r = strtod(handles.txt_radius.string)'''&lt;br /&gt;
|&lt;br /&gt;
Next, we will assign the radius value from the '''Text''' box to a '''variable ‘r’.'''&lt;br /&gt;
&lt;br /&gt;
Later on, we can use the '''variable ‘r'''’ while writing the equation of a circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
cursor on new line outside the '''sl_radius_callback''' function, type,&lt;br /&gt;
&lt;br /&gt;
'''''function &amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()'''''&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;plot&amp;lt;/u&amp;gt;(x,y)'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Further, we will write a '''user defined function plot_circle()''' to plot the circle.&lt;br /&gt;
&lt;br /&gt;
Type the code in the same way as before, with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
This can also be found in the '''Code files''' section.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
|&lt;br /&gt;
First, we have defined the range of '''theta'''.&lt;br /&gt;
&lt;br /&gt;
It will vary from '''0 to 4𝝅''' with a step size of '''0.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
| The next two lines define the '''parametric equation''' of the circle in terms of '''x''' and '''y'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''plot(x,y)'''&lt;br /&gt;
| The following line will plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| The next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Inside the '''sl_radius_callback Function''' type,&lt;br /&gt;
&lt;br /&gt;
'''plot_circle()'''&lt;br /&gt;
|&lt;br /&gt;
Let us call the '''plot_circle()''' function inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of the '''sl_radius_callback''' function definition, type '''plot_circle()'''&lt;br /&gt;
&lt;br /&gt;
As a result, when we move the '''Slider''', the circle is plotted for each radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
press '''Ctrl''' + '''S.'''&lt;br /&gt;
| Let us save the code by pressing '''Ctrl''' + '''S''' keys together on the keyboard.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''' Button on '''menubar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
We will now execute the code.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute''' button on the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
hover over '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the right side'''.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us move the indicator given on the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
We can see that as we move the indicator, a circle is being plotted.&lt;br /&gt;
&lt;br /&gt;
Notice the '''Text''' box. The value of the radius is also getting changed along with it.&lt;br /&gt;
&lt;br /&gt;
Moving the indicator towards the right increases the radius.&lt;br /&gt;
&lt;br /&gt;
And moving the indicator towards the left decreases the radius.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
But, the earlier responses are still visible.&lt;br /&gt;
&lt;br /&gt;
Let us delete them by adding a single line.&lt;br /&gt;
&lt;br /&gt;
This line is to be written at the start of '''plot_circle() function''' definition'''.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Type within '''''&amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()''''' function and then highlight,&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_radius.children)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the line as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
This line deletes all the '''children''' of the current '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Here, '''children''' refers to the '''subplot''' of the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save the work by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
| Let us go back to the '''menu bar''' and click on '''Execute''' and then click on '''File with echo'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2,'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator to the right and then on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Now move the '''Slider''' indicator to the right and then to the left.&lt;br /&gt;
&lt;br /&gt;
The earlier responses are now deleted and no longer visible.&lt;br /&gt;
&lt;br /&gt;
So, in this way we can build a '''GUI''' for plotting a '''2D parametric''' curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''Parametric''' equation of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create a '''GUI''' to plot a '''Parabola''' using its '''parametric equations''',&amp;lt;br&amp;gt;y = a*(t)^2, x = 2*a*t.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change ''''a'''' from '''-1 to 1''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider, ''''t'''' varies from '''-10''' to '''10'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add grid lines to the plot and label the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;We conduct workshops using '''Spoken Tutorials''' and give certificates.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please contact us.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please post your timed queries in this forum.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English</id>
		<title>Scilab/C4/Loading-and-saving-data-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English"/>
				<updated>2021-09-08T06:42:52Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Loading and saving data in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos,TOWS_c, C_binary, workspace, read, write, data file, scilab'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello and welcome to the Spoken Tutorial on “ '''Loading and saving data in Xcos'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn how to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Save '''Xcos''' simulation data values to the '''workspace'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Read and write data in '''Xcos''' simulation using a '''C binary''' file&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab 6.1.0 version'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial, you should have&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Basic knowledge of '''Scilab and Xcos.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;If not, for relevant tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Untitled Xcos editing''' window.&lt;br /&gt;
|&lt;br /&gt;
I have already opened the '''Xcos''' windows.&lt;br /&gt;
&lt;br /&gt;
We can see two windows named '''Untitled Xcos''' and the '''Palette browser''' are opened'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Untitled Xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''SaveData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''Untitled Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
Go to the '''Downloads''' folder and select the file '''SaveData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
|&lt;br /&gt;
Let me adjust the window.&lt;br /&gt;
&lt;br /&gt;
I have already created this file for demonstration.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos''' window.&lt;br /&gt;
| This file has a simple '''Xcos''' simulation diagram.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''RAMP''' block.&lt;br /&gt;
| It uses the '''RAMP''' block to generate a '''Ramp''' signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''CSCOPE''' block.&lt;br /&gt;
|&lt;br /&gt;
And the '''CSCOPE''' block to plot it.&lt;br /&gt;
&lt;br /&gt;
Let us see how to record the generated Ramp signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos window'''&lt;br /&gt;
| First we will see how to push the values generated by the '''RAMP''' block to '''workspace.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''Sinks''' &amp;amp;gt;&amp;amp;gt; scroll down &amp;amp;gt;&amp;amp;gt; click on '''TOWS_c.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''TOWS_c''' block. This is the '''To Workspace''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the '''TOWS_c''' block to the '''SaveData.xcos''' window'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''editing''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''TOWS_c''' block.&lt;br /&gt;
| Double click on the '''TOWS_c''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Size of Buffer.''' Text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The size of buffer is by default set to '''128.'''&lt;br /&gt;
&lt;br /&gt;
This means that 128 values will be saved in the block .&lt;br /&gt;
&lt;br /&gt;
If any more values are passed, the block will overwrite the previous values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Variable Name''' text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The '''Variable Name''' is the name of the variable to which the values are saved.&lt;br /&gt;
&lt;br /&gt;
By default it is set to '''A.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Inherit''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button at the bottom.&lt;br /&gt;
|&lt;br /&gt;
'''Inherit''' is used to decide whether to take the event input or not.&lt;br /&gt;
&lt;br /&gt;
By default Inherit is set to '''0''' which means it has to take event input.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to close this window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''TOWS_c''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''TOWS_c''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the '''Warning message.'''&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
An '''Warning message''' will appear.&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic''' window.&lt;br /&gt;
|&lt;br /&gt;
We can see a straight line with slope 2.&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''workspace.'''&lt;br /&gt;
|&lt;br /&gt;
Now let us look at the values.&lt;br /&gt;
&lt;br /&gt;
Switch to the '''workspace'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
Type '''''A''''' &amp;amp;gt;&amp;amp;gt; press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Let us execute the variable '''A'''.&lt;br /&gt;
&lt;br /&gt;
Type '''A''' on the '''workspace''' and press '''Enter'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
Highlight '''variable A.'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''values.'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''time.'''&lt;br /&gt;
|&lt;br /&gt;
'''A''' is a special variable.&lt;br /&gt;
&lt;br /&gt;
We can either extract '''values''' from '''A''' or we can extract '''times''' from '''A.'''&lt;br /&gt;
&lt;br /&gt;
Let us look at the values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
Type '''''A.values''''' &amp;amp;gt;&amp;amp;gt; Press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''A.values''' on the '''workspace'''.&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
Scroll up to show all the values and Highlight them.&lt;br /&gt;
| These are all the values from the graph and are now saved in the workspace.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
hover cursor on a new line on the workspace.&lt;br /&gt;
| Now we need to save these values in a file so that we can share them.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''SaveData.xcos''' window.&lt;br /&gt;
| Switch back to the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
Click on '''Sinkss''' &amp;amp;gt;&amp;amp;gt; Click on '''WRITEC_f''' block.&lt;br /&gt;
|&lt;br /&gt;
To save these values, we will use the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
Click on the '''WRITEC_f''' block in the right panel.&lt;br /&gt;
&lt;br /&gt;
This is the '''Write to C binary file''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''WRITEC_f''' block.&lt;br /&gt;
| Double click on the '''WRITEC_f''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Size''' Text field to highlight it.&lt;br /&gt;
| '''Input Size''' is the size of our input values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output File Name''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''‘data’'''''&lt;br /&gt;
|&lt;br /&gt;
'''Output File''' is the name of our output file.&lt;br /&gt;
&lt;br /&gt;
I will name the output file as '''‘ data ‘'''.&lt;br /&gt;
&lt;br /&gt;
If no file path is entered, the file will be saved in the '''Current working directory.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to ‘ '''d''' ’&lt;br /&gt;
|&lt;br /&gt;
'''Output Format''' is the format of the output file.&lt;br /&gt;
&lt;br /&gt;
By default it is '''‘ c ‘.''' That is, by default, values are saved as integers.&lt;br /&gt;
&lt;br /&gt;
But, I want to save the values as '''double.''' So''',''' I will change it to '''‘d’.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
| '''Buffer Size''' is the size of the buffer.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning message.&lt;br /&gt;
|&lt;br /&gt;
Let's run the simulation again by clicking on the '''Start''' Button on the '''toolbar.'''&lt;br /&gt;
&lt;br /&gt;
A '''Warning message''' will appear. Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
'''Close''' the Graphic window.&lt;br /&gt;
|&lt;br /&gt;
We can see the graph.&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration.&lt;br /&gt;
| Let's go to the location where we have saved the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''file manager window''',&lt;br /&gt;
&lt;br /&gt;
Click on the '''data''' file once.&lt;br /&gt;
|&lt;br /&gt;
We can see a file named '''‘ data ‘''' .&lt;br /&gt;
&lt;br /&gt;
Since it is a binary encoded file we cannot simply read it.&lt;br /&gt;
&lt;br /&gt;
We would need a special block to read this file.&lt;br /&gt;
|-&lt;br /&gt;
| Switch back to '''SaveData.xcos''' file&lt;br /&gt;
| Switch back to the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''LoadData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK'''&lt;br /&gt;
|&lt;br /&gt;
Let us open the file '''LoadData.xcos'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
Go to '''Downloads''' Folder and select the file '''LoadData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
We will use this file to read our data file.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
| Let me adjust the window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Sources''' &amp;amp;gt;&amp;amp;gt; Click on '''READC_f''' block.&lt;br /&gt;
|&lt;br /&gt;
We will use the '''READC_f''' block to read our values.&lt;br /&gt;
&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sources''' palette.&lt;br /&gt;
&lt;br /&gt;
Click on '''READC_f''' Block in the right panel.&lt;br /&gt;
&lt;br /&gt;
This is the '''Read from C Binary''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''LoadData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''READC_f''' block..&lt;br /&gt;
| Double click on the '''READC_f''' block to configure its properties'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input File Name''' Text field to highlight it. &amp;amp;gt;&amp;amp;gt; Change it to '''''data'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input file''' name is the name and the path of your data file.&lt;br /&gt;
&lt;br /&gt;
Since my data file was named '''data''' I will change it to '''data'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''d.'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input format''' is the format of the data file.&lt;br /&gt;
&lt;br /&gt;
Since the format for my data file is '''double''' , I will change it to '''d'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
Click the '''OK''' button .&lt;br /&gt;
|&lt;br /&gt;
This is the buffer size.&lt;br /&gt;
&lt;br /&gt;
Let’s close this window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black output port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''black input port''' of the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_C''' &amp;amp;amp; the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the '''toolbar'''&lt;br /&gt;
| Let’s run this simulation again by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' Window,&lt;br /&gt;
&lt;br /&gt;
Hover Cursor on the '''Graph.'''&lt;br /&gt;
|&lt;br /&gt;
We have a similar graph to the one we had earlier without using the '''RAMP''' block.&lt;br /&gt;
&lt;br /&gt;
This is because we have loaded the values from the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
This brings us to the end of this tutorial. Let us summarise.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Save '''Xcos''' simulation data values to the '''workspace'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Read and write data in '''Xcos''' Simulation using a '''C binary''' file&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment,&lt;br /&gt;
&lt;br /&gt;
Create two '''Xcos''' simulation files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the first for plotting a straight line with slope 3.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Push the values to the workspace and save them as a binary encoded file.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create another '''Xcos''' simulation to plot a new graph of a straight line with slope 3.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use only the saved data values.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''About Spoken Tutorial project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
|&lt;br /&gt;
Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project.'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Textbook Companion project.&lt;br /&gt;
&lt;br /&gt;
We give Certificates and Honorarium to the contributors.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Lab Migration project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Acknowledgement'''&lt;br /&gt;
| Spoken Tutorial and FOSSEE projects are funded by the Ministry of Education, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is Utkarsh Anand, FOSSEE intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-04T16:18:51Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D parametric curves'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;To plot the '''parametric''' equation of a sphere using '''GUI.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use of '''meshgrid command'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|&lt;br /&gt;
The '''parametric equation''' of a sphere is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;x\  = \ r\ cos\theta\ sin\varphi\ ,\ y\  = \ r\ \ sin\theta\ sin\varphi\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;amp;amp;''' &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;z\  = r\ cos\varphi&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''', '''y, z''' are the '''cartesian coordinates''' of a given point on the sphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the sphere and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''theta''' &amp;amp;amp; '''phi''' are the '''spherical coordinates'''. They lie in the range '''0''' to '''2𝞹'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf''' and '''mesh''' commands in this tutorial.&lt;br /&gt;
&lt;br /&gt;
These '''commands''' are used to create a '''3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
The '''surf command''' draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf command''' will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
The '''mesh command''' also draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh command''' will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf commands''' type the following on the '''Scilab console''':&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting3dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce''' file in the saved folder.&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: sl_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text''' box and an '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’''' and '''String ‘Radius’.'''&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
Next, we have a '''Text''' box to display the radius.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’''' and the '''String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_plot, String: Sphere”&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes''' to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog box that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback function''' definition.&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider''' to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a '''user-defined function plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete function''' to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= &amp;lt;u&amp;gt;meshgrid&amp;lt;/u&amp;gt;(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid command''' is used.&lt;br /&gt;
&lt;br /&gt;
It is used to generate '''u''' and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and '''theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric equation in terms of '''x, y''' and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Next, we will plot a '''3D parametric''' curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf command'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z);'''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
type,&lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere() function''' inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback function''' definition type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the '''indicator''' on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''&amp;lt;u&amp;gt;surf&amp;lt;/u&amp;gt;(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z);'''''&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf''' command to comment it out.&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh''' command to now see its output.&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
| Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh''' command.&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh''' command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| So this way we can build a '''GUI''' for plotting a '''3D''' parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''parametric''' equation of a sphere using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''surf command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''mesh command''' and;&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''meshgrid command'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Using '''surf''' and '''mesh''', build a '''GUI''' to plot a '''3D''' hemisphere.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;'''Parametric''' equations:&amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;x\  = \ r\ cos\theta\ sin\varphi\ ,\ y\  = \ r\ \ sin\theta\ sin\varphi\ &amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;amp;amp;''' &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;z\  = r\ cos\varphi&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Place the hemisphere on a horizontal plane.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change radius ‘'''r'''’ from '''1''' to '''10''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider that '''theta''' &amp;amp;amp; '''phi''' vary from '''0''' to '''𝞹.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add '''grid lines''' to the plot and '''label''' the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English"/>
				<updated>2021-09-04T16:12:19Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves&lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, delete, Scilab, Parametric equation, Circle, 2D, Text box, Axes, callback function, Tag, String'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting 2D parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plot the '''Parametric equation''' of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab''' '''6.1.0''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''GUI Builder Toolbox 4.2.1'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS''' also.&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The learner must have basic knowledge of '''Scilab''' and '''GUI Builder toolbox.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;For pre-requisite '''Scilab''' tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
|&lt;br /&gt;
The '''Parametric Equation''' of a circle is &amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;x\  = \ r\ cos\theta\ \ \text{and\ }y\  = \ r\ \ sin\theta&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''x''' &amp;amp;amp; '''y''' are the coordinates for a given point on the circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''r''' is the radius of the circle.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We will use these two '''equations''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Slider?'''&lt;br /&gt;
|&lt;br /&gt;
'''Slider''' is an object that allows the user to dynamically change the value of a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
It allows the user to move an indicator horizontally to set new values.&lt;br /&gt;
&lt;br /&gt;
The user can also alter the values by clicking on any point on the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a delete function?'''&lt;br /&gt;
|&lt;br /&gt;
The '''delete''' function is used to delete the '''graphical response'''.&lt;br /&gt;
&lt;br /&gt;
The '''object’s''' '''handle''' whose response is to be deleted, is passed as an '''argument'''.&lt;br /&gt;
&lt;br /&gt;
Syntax: '''delete(&amp;amp;lt;handle of an object&amp;amp;gt;)'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting2dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting2dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Let us look at how to use a '''Slider''' to plot a circle with varying radii.&lt;br /&gt;
&lt;br /&gt;
I have opened the '''plotting2dcurves.sce''' file using the '''GUIBuilder toolbox'''.&lt;br /&gt;
&lt;br /&gt;
Now let us look at the '''objects''' that are taken on this graphic window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius”&lt;br /&gt;
|&lt;br /&gt;
We have a '''Text''' box with the '''Tag''' '''‘txt_radius'''’ and the '''String''' part is kept empty.&lt;br /&gt;
&lt;br /&gt;
Hence, a default value '''UnName1''' is assigned to it as '''String.'''&lt;br /&gt;
&lt;br /&gt;
The '''Text''' box will display the exact value of the radius that the '''Slider''' has selected.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_radius, String:Circle”&lt;br /&gt;
|&lt;br /&gt;
We also have an '''Axes''' with the '''Tag''' '''‘ax_radius’''' and the '''String''' as ‘'''Circle'''’.&lt;br /&gt;
&lt;br /&gt;
This will display the '''response''' of the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
| Now let us add a '''Slider''' to control the radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette,'''&lt;br /&gt;
&lt;br /&gt;
click on the '''Slider'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder''' '''Palette''', click on the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window appears.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''sl_radius''''' in '''Tag''' field.&lt;br /&gt;
&lt;br /&gt;
Type '''''Radius''''' in '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''''sl_radius''''' in the '''Tag''' field and '''''Radius''''' in the '''String''' field.&lt;br /&gt;
&lt;br /&gt;
Close the window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
| Now place the '''Slider''' above the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
move the indicator on the '''Slider''' horizontally.&lt;br /&gt;
|&lt;br /&gt;
Then move the '''Slider''' indicator horizontally to vary the value.&lt;br /&gt;
&lt;br /&gt;
However, we find that we are unable to move the indicator.&lt;br /&gt;
&lt;br /&gt;
We must first enable the '''Slider''' to do so. Let us do that.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on the right side panel.&lt;br /&gt;
|&lt;br /&gt;
Go to the '''GUIBuilder Palette''' and look at the right side panel.&lt;br /&gt;
&lt;br /&gt;
It displays a list of '''Tag''' names for the objects on the '''Graphic''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''sl_radius'''.&lt;br /&gt;
&lt;br /&gt;
Click on '''Object Properties'''.&lt;br /&gt;
|&lt;br /&gt;
Click on '''sl_radius.'''&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Object Properties''' button at the bottom right of the window.&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window will open.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
hover over '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
change '''Enable''' property to ‘'''on'''’.&lt;br /&gt;
|&lt;br /&gt;
Search for the object property '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
Change it from '''Off''' to '''On'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Max''' field.&lt;br /&gt;
&lt;br /&gt;
Change the value from '''1 to 10'''.&lt;br /&gt;
|&lt;br /&gt;
We also have to change one more object property which is ''''Max''''.&lt;br /&gt;
&lt;br /&gt;
This property will set the upper limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
Change it from '''1''' to '''10'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Min''' field.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Notice the object property ''''Min'''' which is lower limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
It is always set to '''0,''' by default.&lt;br /&gt;
&lt;br /&gt;
Now, let us vary the value of the radius using the '''Slider''' from '''0 to 10'''.&lt;br /&gt;
&lt;br /&gt;
Let us save the changes by clicking on the '''OK''' button at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover cursor over the '''Graphic Window Number 1'''.&lt;br /&gt;
|&lt;br /&gt;
Now, I will generate the '''Scilab''' code for the same.&lt;br /&gt;
&lt;br /&gt;
In the code file, we will write the code to connect the '''Slider''' and the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
As a result, the '''Text''' box will display the exact value of the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
We will also write a '''user-defined function''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''Generate,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' click on the '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-2d'''''.&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-2d.'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created''' Window,&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
A '''dialog''' box appears and displays the message “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''SciNotes''' Window.&lt;br /&gt;
| The corresponding '''Scilab''' code opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius''' is the '''handle''' for the '''Text''' box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.ax_radius'''.&lt;br /&gt;
| '''handles.ax_radius''' is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius''' is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on '''sl_radius_callback''' Function.&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a function definition for '''sl_radius_callback''' function.&lt;br /&gt;
&lt;br /&gt;
The function will basically link the '''Text''' box and the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''SciNotes''' window,&lt;br /&gt;
&lt;br /&gt;
within '''sl_radius_callback''' type,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
The same code can be found in a file in the '''Code files''' section on this video page.&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius.string = string(handles.sl_radius.value)'''&lt;br /&gt;
| This line will assign the value of the '''Slider''' to the '''Text''' box'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''r = strtod(handles.txt_radius.string)'''&lt;br /&gt;
|&lt;br /&gt;
Next, we will assign the radius value from the '''Text''' box to a '''variable ‘r’.'''&lt;br /&gt;
&lt;br /&gt;
Later on, we can use the '''variable ‘r'''’ while writing the equation of a circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
cursor on new line outside the '''sl_radius_callback''' function, type,&lt;br /&gt;
&lt;br /&gt;
'''''function &amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()'''''&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''&amp;lt;u&amp;gt;plot&amp;lt;/u&amp;gt;(x,y)'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Further, we will write a '''user defined function plot_circle()''' to plot the circle.&lt;br /&gt;
&lt;br /&gt;
Type the code in the same way as before, with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
This can also be found in the '''Code files''' section.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
|&lt;br /&gt;
First, we have defined the range of '''theta'''.&lt;br /&gt;
&lt;br /&gt;
It will vary from '''0 to 4𝝅''' with a step size of '''0.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
| The next two lines define the '''parametric equation''' of the circle in terms of '''x''' and '''y'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''plot(x,y)'''&lt;br /&gt;
| The following line will plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| The next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Inside the '''sl_radius_callback Function''' type,&lt;br /&gt;
&lt;br /&gt;
'''plot_circle()'''&lt;br /&gt;
|&lt;br /&gt;
Let us call the '''plot_circle()''' function inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
At the end of the '''sl_radius_callback''' function definition, type '''plot_circle()'''&lt;br /&gt;
&lt;br /&gt;
As a result, when we move the '''Slider''', the circle is plotted for each radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
press '''Ctrl''' + '''S.'''&lt;br /&gt;
| Let us save the code by pressing '''Ctrl''' + '''S''' keys together on the keyboard.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''' Button on '''menubar.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
We will now execute the code.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute''' button on the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
Then click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
hover over '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the right side'''.'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us move the indicator given on the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
We can see that as we move the indicator, a circle is being plotted.&lt;br /&gt;
&lt;br /&gt;
Notice the '''Text''' box. The value of the radius is also getting changed along with it.&lt;br /&gt;
&lt;br /&gt;
Moving the indicator towards the right increases the radius.&lt;br /&gt;
&lt;br /&gt;
And moving the indicator towards the left decreases the radius.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
But, the earlier responses are still visible.&lt;br /&gt;
&lt;br /&gt;
Let us delete them by adding a single line.&lt;br /&gt;
&lt;br /&gt;
This line is to be written at the start of '''plot_circle() function''' definition'''.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Type within '''''&amp;lt;u&amp;gt;plot_circle&amp;lt;/u&amp;gt;()''''' function and then highlight,&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_radius.children)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the line as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
This line deletes all the '''children''' of the current '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Here, '''children''' refers to the '''subplot''' of the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl''' + '''S''' on the keyboard.&lt;br /&gt;
| Let us save the work by pressing '''Ctrl''' + '''S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
| Let us go back to the '''menu bar''' and click on '''Execute''' and then click on '''File with echo'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2,'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator to the right and then on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Now move the '''Slider''' indicator to the right and then to the left.&lt;br /&gt;
&lt;br /&gt;
The earlier responses are now deleted and no longer visible.&lt;br /&gt;
&lt;br /&gt;
So, in this way we can build a '''GUI''' for plotting a '''2D parametric''' curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plotted the '''Parametric''' equation of a circle using '''GUI'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used a '''Slider''' to vary the radius of a circle and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Used the '''delete function'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create a '''GUI''' to plot a '''Parabola''' using its '''parametric equations'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;y = at^{2}&amp;lt;/math&amp;gt;,&amp;lt;math display=&amp;quot;inline&amp;quot;&amp;gt;x = 2at&amp;lt;/math&amp;gt;&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Change ''''a'''' from '''-1 to 1''' using a '''Slider''' and display it in a '''Text''' box.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Consider, ''''t'''' varies from '''-10''' to '''10'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Add grid lines to the plot and label the '''Axes'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;We conduct workshops using '''Spoken Tutorials''' and give certificates.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please contact us.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please post your timed queries in this forum.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The '''Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Conditional-operations-in-Xcos/English</id>
		<title>Scilab/C4/Conditional-operations-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Conditional-operations-in-Xcos/English"/>
				<updated>2021-09-04T15:55:52Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''tTitle of script''': Conditional operations in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos, conditional operation, scilab, if-else, loops'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello and welcome to the Spoken Tutorial on “'''Conditional Operations in Xcos'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn how to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''If then Else''' conditional operator in '''Xcos'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Display the output of the conditional operations.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Halt the simulation after a condition is reached.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab 6.1.0'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial, you should have :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Basic knowledge of '''Scilab and Xcos.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If not, then go through the '''Scilab''' spoken tutorials on this website.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Untitled Xcos''' window.&lt;br /&gt;
|&lt;br /&gt;
I have already opened the '''Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
We can see two windows named '''Untitled Xcos''' and the '''Palette browser.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Untitled Xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''ConditionalOperations.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''Untitled Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
Go to the '''Downloads''' folder and select the file '''ConditionalOperations.xcos.'''&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
I have already created this file for demonstration.&lt;br /&gt;
|-&lt;br /&gt;
| cursor on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
| This file has a simple '''Xcos''' simulation diagram.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''ConditionalOperations.xcos window'''&lt;br /&gt;
|&lt;br /&gt;
Let us add conditional expressions to this file.&lt;br /&gt;
&lt;br /&gt;
To add conditional expressions we will use the '''Expression''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''user-defined-functions''' &amp;amp;gt;&amp;amp;gt; click on '''Expression.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''User-Defined-Functions''' section.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''Expression''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''Expressio'''n block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''Expression''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos window''',&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Expression''' block.&lt;br /&gt;
| Double click on the '''Expression block''' to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''Number of Input''' textbox to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''1'''.&lt;br /&gt;
|&lt;br /&gt;
First is the '''number of inputs'''.&lt;br /&gt;
&lt;br /&gt;
By default it is '''2''' which means it can receive 2 input values.&lt;br /&gt;
&lt;br /&gt;
Let us change it to '''1'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''scilab expression''' textbox to highlight it &amp;amp;gt;&amp;amp;gt; type '''(u1&amp;amp;gt;10)*1''' '''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, is the '''conditional expression'''.&lt;br /&gt;
&lt;br /&gt;
This is the expression which will be evaluated by the '''Expression''' block.&lt;br /&gt;
&lt;br /&gt;
In '''Xcos,''' by default variables like '''u1, u2''' are used while writing the conditional expressions.&lt;br /&gt;
&lt;br /&gt;
Let us change the default expression.&lt;br /&gt;
&lt;br /&gt;
Enter the expression as shown here.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
Double click on the scilab '''expression''' textbox to highlight it.&lt;br /&gt;
| This means that, if '''''u1 &amp;amp;gt; 10''''' then the block should return '''1'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
| Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''ConditionalOperations.xcos window'''&lt;br /&gt;
|&lt;br /&gt;
Let us display the output of the '''Expression''' block.&lt;br /&gt;
&lt;br /&gt;
To do this, we will use the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''sinks''' &amp;amp;gt;&amp;amp;gt; click on '''AFFICH_m.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''AFFICH_m''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''AFFICH_m''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''EXPRESSION''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''black output port''' of the '''EXPRESSION''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''black input port''' of the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''AFFICH_m''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''menu bar,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Simulation''' &amp;amp;gt;&amp;amp;gt; Click on '''Setup.'''&lt;br /&gt;
|&lt;br /&gt;
Before that, we need to change the execution time to Real time.&lt;br /&gt;
&lt;br /&gt;
On the '''menu bar''', click on '''Simulation.'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Setup.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Set parameters''' window''','''&lt;br /&gt;
&lt;br /&gt;
Change '''Real Time Scaling''' to 1 &amp;amp;gt;&amp;amp;gt; Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Change '''Real Time Scaling''' to '''1'''.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning Message.&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A '''Warning Message''' will appear.&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''AFFICH_m''' block.&lt;br /&gt;
|&lt;br /&gt;
We can see that the '''AFFICH_m''' block displays '''0''' as long as the graph is less than '''10''' .&lt;br /&gt;
&lt;br /&gt;
After the graph exceeds '''10''' the '''AFFICH_m''' block displays '''1'''.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Graphic Window.'''&lt;br /&gt;
|&lt;br /&gt;
Suppose we want our simulation to end after some condition has been achieved.&lt;br /&gt;
&lt;br /&gt;
To do this, we will use the '''IFTHEL_f''' block. This is the '''IF-ELSE''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Close the '''Graphic Window.'''&lt;br /&gt;
| Let’s close the '''Graphic window.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''Event-Handling''' &amp;amp;gt;&amp;amp;gt; click on '''IFTHEL_f.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Event Handling''' section.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''IFTHEL_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''IFTHEL_f''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''IFTHEL_f''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''IFTHEL_m''' block.&lt;br /&gt;
| Now, to halt the simulation we would need the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''Event-Handling''' &amp;amp;gt;&amp;amp;gt; click on '''HALT_f.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Event Handling''' section.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''HALT_f''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''HALT_f''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''HALT_f''' block.&lt;br /&gt;
| The '''HALT_f''' block will end the simulation when the condition in the '''IFTHEL_f''' block is satisfied.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''EXPRESSION''' and the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select any of the '''red output ports''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''red input port''' of the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line entering the '''red input port''' of the '''AFFICH_m''' block'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning Message.&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation again by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A '''Warning Message''' will appear.&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''AFFICH_m''' block.&lt;br /&gt;
|&lt;br /&gt;
Observe that as soon as the value in the '''AFFICH_m''' block becomes '''1''', the simulation stops.&lt;br /&gt;
&lt;br /&gt;
So this way we can use conditional operations in '''Xcos'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
This brings us to the end of this tutorial. Let us summarise.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the '''If then Else''' conditional operator in '''Xcos'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Display the output of the conditional operations.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Halt the simulation after a condition is reached.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment&lt;br /&gt;
&lt;br /&gt;
Create a '''Xcos''' Simulation file to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Plot a straight line with slope 5.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Apply a conditional operator which will output 1 if the value is divisible by 9.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Halt the simulation when the condition evaluates to True.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''About Spoken Tutorial project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project.'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Textbook Companion project.&lt;br /&gt;
&lt;br /&gt;
We give Certificates and Honorarium to the contributors.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Lab Migration project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Acknowledgement'''&lt;br /&gt;
| Spoken Tutorial and FOSSEE projects are funded by the Ministry of Education, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is Utkarsh, FOSSEE intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English</id>
		<title>Scilab/C4/Loading-and-saving-data-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English"/>
				<updated>2021-09-04T15:47:29Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Loading and saving data in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos,TOWS_c, C_binary, workspace, read, write, data file, scilab'''&lt;br /&gt;
&lt;br /&gt;
{|border=1&lt;br /&gt;
! '''Visual Cue'''&lt;br /&gt;
! '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello and welcome to the Spoken Tutorial on “ '''Loading and saving data in Xcos'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn how to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Save '''Xcos''' simulation data values to the '''workspace'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Read and write data in '''Xcos''' simulation using a '''C binary''' file&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Ubuntu 18.04 OS''' and&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;'''Scilab 6.1.0 version'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial, you should have&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Basic knowledge of '''Scilab and Xcos.'''&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;If not, for relevant tutorials please visit this website.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;The files used in this tutorial are provided in the '''Code files''' link.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Please download and extract the files.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Make a copy and then use them while practising.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Untitled Xcos editing''' window.&lt;br /&gt;
|&lt;br /&gt;
I have already opened the '''Xcos''' windows.&lt;br /&gt;
&lt;br /&gt;
We can see two windows named '''Untitled Xcos''' and the '''Palette browser''' are opened'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Untitled Xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''SaveData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''Untitled Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
Go to the '''Downloads''' folder and select the file '''SaveData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
|&lt;br /&gt;
Let me adjust the window.&lt;br /&gt;
&lt;br /&gt;
I have already created this file for demonstration.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos''' window.&lt;br /&gt;
| This file has a simple '''Xcos''' simulation diagram.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''RAMP''' block.&lt;br /&gt;
| It uses the '''RAMP''' block to generate a '''Ramp''' signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''CSCOPE''' block.&lt;br /&gt;
|&lt;br /&gt;
And the '''CSCOPE''' block to plot it.&lt;br /&gt;
&lt;br /&gt;
Let us see how to record the generated Ramp signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos window'''&lt;br /&gt;
| First we will see how to push the values generated by the '''RAMP''' block to '''workspace.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
click on '''Sinks''' &amp;amp;gt;&amp;amp;gt; scroll down &amp;amp;gt;&amp;amp;gt; click on '''TOWS_c.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''TOWS_c''' block. This is the '''To Workspace''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the '''TOWS_c''' block to the '''SaveData.xcos''' window'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''editing''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''TOWS_c''' block.&lt;br /&gt;
| Double click on the '''TOWS_c''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Size of Buffer.''' Text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The size of buffer is by default set to '''128.'''&lt;br /&gt;
&lt;br /&gt;
This means that 128 values will be saved in the block .&lt;br /&gt;
&lt;br /&gt;
If any more values are passed, the block will overwrite the previous values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Variable Name''' text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The '''Variable Name''' is the name of the variable to which the values are saved.&lt;br /&gt;
&lt;br /&gt;
By default it is set to '''A.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Inherit''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button at the bottom.&lt;br /&gt;
|&lt;br /&gt;
'''Inherit''' is used to decide whether to take the event input or not.&lt;br /&gt;
&lt;br /&gt;
By default Inherit is set to '''0''' which means it has to take event input.&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to close this window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''TOWS_c''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''TOWS_c''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the '''Warning message.'''&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
An '''Warning message''' will appear.&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic''' window.&lt;br /&gt;
|&lt;br /&gt;
We can see a straight line with slope 2.&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''workspace.'''&lt;br /&gt;
|&lt;br /&gt;
Now let us look at the values.&lt;br /&gt;
&lt;br /&gt;
Switch to the '''workspace'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
Type '''''A''''' &amp;amp;gt;&amp;amp;gt; press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Let us execute the variable '''A'''.&lt;br /&gt;
&lt;br /&gt;
Type '''A''' on the '''workspace''' and press '''Enter'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
Highlight '''variable A.'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''values.'''&lt;br /&gt;
&lt;br /&gt;
Highlight '''time.'''&lt;br /&gt;
|&lt;br /&gt;
'''A''' is a special variable.&lt;br /&gt;
&lt;br /&gt;
We can either extract '''values''' from '''A''' or we can extract '''times''' from '''A.'''&lt;br /&gt;
&lt;br /&gt;
Let us look at the values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
Type '''''A.values''''' &amp;amp;gt;&amp;amp;gt; Press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''A.values''' on the '''workspace'''.&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
Scroll up to show all the values and Highlight them.&lt;br /&gt;
| These are all the values from the graph and are now saved in the workspace.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
hover cursor on a new line on the workspace.&lt;br /&gt;
| Now we need to save these values in a file so that we can share them.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''SaveData.xcos''' window.&lt;br /&gt;
| Switch back to the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
Click on '''Sinkss''' &amp;amp;gt;&amp;amp;gt; Click on '''WRITEC_f''' block.&lt;br /&gt;
|&lt;br /&gt;
To save these values, we will use the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
Click on the '''WRITEC_f''' block in the right panel.&lt;br /&gt;
&lt;br /&gt;
This is the '''Write to C binary file''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''WRITEC_f''' block.&lt;br /&gt;
| Double click on the '''WRITEC_f''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Size''' Text field to highlight it.&lt;br /&gt;
| '''Input Size''' is the size of our input values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output File Name''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''‘data’'''''&lt;br /&gt;
|&lt;br /&gt;
'''Output File''' is the name of our output file.&lt;br /&gt;
&lt;br /&gt;
I will name the output file as '''‘ data ‘'''.&lt;br /&gt;
&lt;br /&gt;
If no file path is entered, the file will be saved in the '''Current working directory.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to ‘ '''d''' ’&lt;br /&gt;
|&lt;br /&gt;
'''Output Format''' is the format of the output file.&lt;br /&gt;
&lt;br /&gt;
By default it is '''‘ c ‘.''' That is, by default, values are saved as integers.&lt;br /&gt;
&lt;br /&gt;
But, I want to save the values as '''double.''' So''',''' I will change it to '''‘d’.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
| '''Buffer Size''' is the size of the buffer.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning message.&lt;br /&gt;
|&lt;br /&gt;
Let's run the simulation again by clicking on the '''Start''' Button on the '''toolbar.'''&lt;br /&gt;
&lt;br /&gt;
A '''Warning message''' will appear. Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
'''Close''' the Graphic window.&lt;br /&gt;
|&lt;br /&gt;
We can see the graph.&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration.&lt;br /&gt;
| Let's go to the location where we have saved the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''file manager window''',&lt;br /&gt;
&lt;br /&gt;
Click on the '''data''' file once.&lt;br /&gt;
|&lt;br /&gt;
We can see a file named '''‘ data ‘''' .&lt;br /&gt;
&lt;br /&gt;
Since it is a binary encoded file we cannot simply read it.&lt;br /&gt;
&lt;br /&gt;
We would need a special block to read this file.&lt;br /&gt;
|-&lt;br /&gt;
| Switch back to '''SaveData.xcos''' file&lt;br /&gt;
| Switch back to the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''LoadData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK'''&lt;br /&gt;
|&lt;br /&gt;
Let us open the file '''LoadData.xcos'''&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
Go to '''Downloads''' Folder and select the file '''LoadData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
We will use this file to read our data file.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
| Let me adjust the window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Sources''' &amp;amp;gt;&amp;amp;gt; Click on '''READC_f''' block.&lt;br /&gt;
|&lt;br /&gt;
We will use the '''READC_f''' block to read our values.&lt;br /&gt;
&lt;br /&gt;
Go to the '''palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sources''' palette.&lt;br /&gt;
&lt;br /&gt;
Click on '''READC_f''' Block in the right panel.&lt;br /&gt;
&lt;br /&gt;
This is the '''Read from C Binary''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''LoadData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''READC_f''' block..&lt;br /&gt;
| Double click on the '''READC_f''' block to configure its properties'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input File Name''' Text field to highlight it. &amp;amp;gt;&amp;amp;gt; Change it to '''''data'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input file''' name is the name and the path of your data file.&lt;br /&gt;
&lt;br /&gt;
Since my data file was named '''data''' I will change it to '''data'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''d.'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input format''' is the format of the data file.&lt;br /&gt;
&lt;br /&gt;
Since the format for my data file is '''double''' , I will change it to '''d'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
Click the '''OK''' button .&lt;br /&gt;
|&lt;br /&gt;
This is the buffer size.&lt;br /&gt;
&lt;br /&gt;
Let’s close this window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
Select the '''black output port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''black input port''' of the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the '''CLOCK_C''' &amp;amp;amp; the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the '''toolbar'''&lt;br /&gt;
| Let’s run this simulation again by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' Window,&lt;br /&gt;
&lt;br /&gt;
Hover Cursor on the '''Graph.'''&lt;br /&gt;
|&lt;br /&gt;
We have a similar graph to the one we had earlier without using the '''RAMP''' block.&lt;br /&gt;
&lt;br /&gt;
This is because we have loaded the values from the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
This brings us to the end of this tutorial. Let us summarise.&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Save '''Xcos''' simulation data values to the '''workspace'''.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Read and write data in '''Xcos''' Simulation using a '''C binary''' file&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment,&lt;br /&gt;
&lt;br /&gt;
Create two '''Xcos''' simulation files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use the first for plotting a straight line with slope 3.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Push the values to the workspace and save them as a binary encoded file.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Create another '''Xcos''' simulation to plot a new graph of a straight line with slope 3.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;&amp;lt;blockquote&amp;gt;&amp;lt;p&amp;gt;Use only the saved data values.&amp;lt;/p&amp;gt;&amp;lt;/blockquote&amp;gt;&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''About Spoken Tutorial project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
|&lt;br /&gt;
Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project.'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Textbook Companion project.&lt;br /&gt;
&lt;br /&gt;
We give Certificates and Honorarium to the contributors.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Lab Migration project.&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this website.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Acknowledgement'''&lt;br /&gt;
| Spoken Tutorial and FOSSEE projects are funded by the Ministry of Education, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is Utkarsh Anand, FOSSEE intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-3D-parametric-curves-in-GUI/English"/>
				<updated>2021-08-06T13:21:15Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: Created page with &amp;quot;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves   '''Author: Rashmi Patankar, Utkarsh Anand'''  '''Keywords: GUI, GUI Builder Toolbox,...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting '''3D''' parametric curves &lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, Scilab, Parametric equation, Sphere, 3D, Text box, Axes, callback function, surf, mesh, meshgrid'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border = 1&lt;br /&gt;
| '''Visual Cue'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting '''3D parametric curves'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this''' '''tutorial, we will learn:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS '''also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
| To follow this tutorial:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Sphere?'''&lt;br /&gt;
|&lt;br /&gt;
The''' parametric equation''' of a sphere is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{x = r}\cos ⁡\theta\mathit{sin\varphi},{y = r}\sin ⁡\theta\mathit{sin\varphi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;amp;amp; '''&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{z = r}\cos\varphi&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where''','''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will use these three equations to plot the sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Commands to create 3D surface plots'''&lt;br /&gt;
|&lt;br /&gt;
'''Scilab''' offers many ways to create and customize various types of '''3D''' plots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will learn to use the '''surf '''and '''mesh '''commands in this tutorial. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These '''commands''' are used to create a''' 3D''' surface plot.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the surf command?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
The '''surf command''' draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It essentially creates a surface with a solid edge and solid face colors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence, in this tutorial, the '''surf command''' will plot a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''What is the mesh command?'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
The '''mesh command''' also draws a '''3D parametric''' surface plot.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
In this case, the surface has solid edge colors but no face colors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So, in this tutorial, the '''mesh command''' will plot a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Scilab Help Documentation'''&lt;br /&gt;
|&lt;br /&gt;
For more information on '''mesh''' and '''surf commands''' type the following on the''' Scilab console''':&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''help surf'''''&lt;br /&gt;
&lt;br /&gt;
'''''help mesh'''''&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting3dcurves.sce''' file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting3dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Locate the '''plotting3dcurves.sce '''file in the saved folder. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the file '''plotting3dcurves.sce''' using the '''GUIBuilder''' '''Toolbox.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Slider, Text '''box''' '''and an''' Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: sl_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
It shows the '''GUI''' with three '''objects''', namely '''Slider, Text '''box''' '''and an''' Axes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Slider''' has '''Tag ‘sl_radius’ '''and '''String ‘Radius’. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Its value can vary from '''10''' to '''20'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius, String: Radius”&lt;br /&gt;
|&lt;br /&gt;
Next we have a '''Text '''box''' '''to display the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘txt_radius’ '''and the''' String''' '''‘Radius’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_plot, String: Sphere”&lt;br /&gt;
|&lt;br /&gt;
Lastly, we have the '''Axes '''to display the plot of the sphere.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has '''Tag ‘ax_plot’''' and '''String ‘Sphere’'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us generate the '''Scilab''' code for the same.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
in the '''menu bar''',&lt;br /&gt;
&lt;br /&gt;
click on '''Generate.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code''' .&lt;br /&gt;
|&lt;br /&gt;
Go to '''GUIBuilder Palette''', and click on '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-3d'''''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as''' parametric-3d.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created '''Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
It shows a new dialog''' '''box''' '''that displays “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The corresponding '''Scilab''' code file opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight, &lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius '''is the '''handle''' for the '''Text '''box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight, &lt;br /&gt;
&lt;br /&gt;
'''handles.ax_plot'''.&lt;br /&gt;
| '''handles.ax_plot '''is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight, &lt;br /&gt;
&lt;br /&gt;
'''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius '''is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback '''function,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Now notice the '''sl_radius_callback function definition'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It has two lines of code in it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The code essentially connects the '''Slider '''to the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result when the '''Slider''' is moved, its exact value is displayed in the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then the value of the '''Text''' box is stored inside a '''variable ‘r’'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
type on new line outside the '''sl_radius_callback''' function,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''function plot_sphere()'''''&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_plot.children)'''''&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi; '''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= ''''''meshgrid''''''(u,v)'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''surf''''''(x, y, z); '''''&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z); '''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plotting sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Now, let us write a '''user-defined function plot_sphere()''' to plot the sphere.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same code can be found under the Code files section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Highlight,&lt;br /&gt;
&lt;br /&gt;
'''delete(handles.ax_sphere.children).'''&lt;br /&gt;
| First, I have written a '''delete function''' to remove the subplots of the graph.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''u = 0:0.1:2*%pi;'''''&lt;br /&gt;
&lt;br /&gt;
'''''v = 0:0.1:2*%pi; '''''&lt;br /&gt;
&lt;br /&gt;
'''''[phi, theta]= ''''''meshgrid''''''(u,v);'''''&lt;br /&gt;
|&lt;br /&gt;
Notice the next three lines.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''meshgrid command''' is used.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is used to generate''' u '''and '''v matrices''' for '''three-dimensional''' plots.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The range of '''u''' and '''v''' is defined from '''0''' to '''2𝞹''' with a '''step''' size of '''0.1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, the '''matrices''' '''u''' and '''v''' are stored into '''phi''' and''' theta''' respectively.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)*sin(phi);'''''&lt;br /&gt;
&lt;br /&gt;
'''''z = r*cos(phi);'''''&lt;br /&gt;
| Further three lines define the sphere's parametric''' '''equation in terms of '''x, y '''and '''z'''.&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| Next, we will plot a '''3D parametric''' curve of a sphere.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''surf''''''(x, y, z); '''''&lt;br /&gt;
| Firstly, we’ll see the output of the '''surf command'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''//mesh(x, y, z); '''''&lt;br /&gt;
|&lt;br /&gt;
Then next we will see the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For now, I have commented out this line by putting two forward slashes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence the output of only '''surf''' command will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of sphere', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| Then the next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
inside '''sl_radius_callback '''function,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
type, &lt;br /&gt;
&lt;br /&gt;
'''''plot_sphere()'''''&lt;br /&gt;
|&lt;br /&gt;
Now let us call the '''plot_sphere() function''' inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback function '''definition''' '''type '''plot_sphere().'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result, varying the radius value on the '''Slider''' the sphere will be plotted.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl '''+''' S''' on the keyboard.&lt;br /&gt;
| Let us save our code by pressing '''Ctrl '''+''' S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on the '''Execute''' button in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Now, run this simulation by clicking on the '''Execute''' button in the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards right slowly.&lt;br /&gt;
|&lt;br /&gt;
We can see that as we move the '''indicator''' on the '''Slider,''' a sphere is being plotted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''surf command''' now plots a colored '''3D''' sphere.&lt;br /&gt;
|-&lt;br /&gt;
| Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
Now let us test the output of the '''mesh command'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
//'''''surf''''''(x, y, z); '''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''mesh(x, y, z); '''''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl + S.'''&lt;br /&gt;
|&lt;br /&gt;
I'll now add two forward slashes before the '''surf '''command to comment it out.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then I’ll remove the forward slashes added before the '''mesh '''command to now see its output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Save the code by pressing '''Ctrl + S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
click on '''Execute''',&lt;br /&gt;
&lt;br /&gt;
click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Again, click on the '''Execute''' menu and then on '''File with echo.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic window Number 2.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
move the '''Slider''' indicator towards the right slowly.&lt;br /&gt;
|&lt;br /&gt;
The '''Graphic window Number 2''' will now show the output of the '''mesh '''command.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us move the '''Slider''' indicator and observe the output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As stated earlier, the '''mesh '''command now plots a '''3D''' sphere with a white surface.&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| So this way we can build a '''GUI '''for plotting a '''3D '''parametric curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this''' '''tutorial, we have:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Parametric''' equations:&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{x = r}\cos ⁡\theta\mathit{sin\varphi},{y = r}\sin ⁡\theta\mathit{sin\varphi}&amp;lt;/math&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''&amp;amp;amp; '''&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{z = r}\cos\varphi&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
We conduct workshops using '''Spoken Tutorials''' and give certificates.&lt;br /&gt;
&lt;br /&gt;
Please contact us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The''' Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</id>
		<title>GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/GUI-in-Scilab/C2/Plotting-2D-parametric-curves-in-GUI/English"/>
				<updated>2021-08-06T13:15:10Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: Created page with &amp;quot;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves   '''Author: Rashmi Patankar, Utkarsh Anand'''  '''Keywords: GUI, GUI Builder Toolbox, Slider...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of the script:''' Building a '''GUI''' for plotting 2D parametric curves &lt;br /&gt;
&lt;br /&gt;
'''Author: Rashmi Patankar, Utkarsh Anand'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: GUI, GUI Builder Toolbox, Slider, delete, Scilab, Parametric equation, Circle, 2D, Text box, Axes, callback function, Tag, String'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border = 1&lt;br /&gt;
| '''Visual Cue'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello, and welcome to the Spoken Tutorial on “Building a '''GUI''' for plotting 2D parametric curves”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
| In this''' '''tutorial, we will learn to:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Only Narration'''&lt;br /&gt;
|&lt;br /&gt;
To record this tutorial, I am using:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The process demonstrated in this tutorial is identical in '''Windows OS '''also.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Annotations are added to the tutorial if there are any differences.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
https://www.spoken-tutorial.org&lt;br /&gt;
| To follow this tutorial:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Parametric Equation of a Circle?'''&lt;br /&gt;
|&lt;br /&gt;
The''' Parametric Equation''' of a circle is &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{x = r}\cos ⁡{{\theta \land y} = r}\sin ⁡\theta&amp;lt;/math&amp;gt;'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Where,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will use these two '''equations''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a Slider?'''&lt;br /&gt;
|&lt;br /&gt;
'''Slider''' is an object that allows the user to dynamically change the value of a '''parameter'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It allows the user to move an indicator horizontally to set new values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The user can also alter the values by clicking on any point on the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''What is a delete function?'''&lt;br /&gt;
|&lt;br /&gt;
The '''delete '''function is used to delete the '''graphical response'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''object’s''' '''handle''' whose response is to be deleted, is passed as an '''argument'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Syntax: '''delete(&amp;amp;lt;handle of an object&amp;amp;gt;)'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Switch to '''GUIBuilder Toolbox.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Open the '''plotting2dcurves.sce '''file.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “plotting2dcurves.sce”&lt;br /&gt;
|&lt;br /&gt;
Let us look at how to use a''' Slider''' to plot a circle with varying radii.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have opened the '''plotting2dcurves.sce''' file using the '''GUIBuilder toolbox'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let us look at the '''objects''' that are taken on this graphic window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over the '''Text '''box.&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: txt_radius”&lt;br /&gt;
|&lt;br /&gt;
We have a '''Text '''box with the '''Tag''' '''‘txt_radius'''’ and the '''String '''part is kept empty.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hence a default value '''UnName1''' is assigned to it as '''String.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Text''' box will display the exact value of the radius that the '''Slider''' has selected.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover over '''Axes'''. &lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “Tag: ax_radius, String:Circle”&lt;br /&gt;
|&lt;br /&gt;
We also have an '''Axes''' with the '''Tag''' '''‘ax_radius’''' and '''String '''as ‘'''Circle'''’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This will display the '''response''' of the circle.&lt;br /&gt;
|-&lt;br /&gt;
| &lt;br /&gt;
| Now let us add a '''Slider '''to control the radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette,'''&lt;br /&gt;
&lt;br /&gt;
click on the '''Slider'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder''' '''Palette''', click on the '''Slider'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request''' window appears.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Values Request '''Window,&lt;br /&gt;
&lt;br /&gt;
type '''''sl_radius''''' in '''Tag''' field.&lt;br /&gt;
&lt;br /&gt;
Type '''''Radius''''' in '''String''' field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''''sl_radius '''''in the '''Tag''' field and '''''Radius''''' in the '''String''' field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close the window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
place the '''Slider''' above the '''Text '''box.&lt;br /&gt;
|&lt;br /&gt;
Now place the '''Slider''' above the '''Text '''box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
move the indicator on the '''Slider '''horizontally.&lt;br /&gt;
|&lt;br /&gt;
Then move the '''Slider''' indicator horizontally to vary the value.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
However, we find that we are unable to move the indicator.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We must first enable the '''Slider''' to do so. Let us do that.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette '''Window,&lt;br /&gt;
&lt;br /&gt;
cursor on the right side panel.&lt;br /&gt;
|&lt;br /&gt;
Go to '''GUIBuilder Palette''' and look at the right side panel.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It displays a list of '''Tag''' names for the objects on the '''Graphic '''window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''GUIBuilder Palette '''Window,&lt;br /&gt;
&lt;br /&gt;
click on '''sl_radius'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Object Properties'''.&lt;br /&gt;
|&lt;br /&gt;
Click on the '''sl_radius.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''Object Properties''' button at the bottom right of the window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Scilab Multiple Values Request '''window will open.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
hover over '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
change '''Enable''' property to ‘'''on'''’.&lt;br /&gt;
|&lt;br /&gt;
Search for the object property '''Enable'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change it from '''Off '''to '''On'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Max''' field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the value from '''1 to 10'''.&lt;br /&gt;
|&lt;br /&gt;
We also have to change one more object property which is ''''Max''''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This property will set the upper limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change it from '''1 '''to''' 10'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''Min''' field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Notice the object property ''''Min'''' which is lower limit of the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is always set to '''0, '''by default.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now let’s vary the value of the radius using the '''Slider''' from '''0 to 10'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us save the changes by clicking on the '''OK''' button at the bottom.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 1''',&lt;br /&gt;
&lt;br /&gt;
hover cursor over the '''Graphic Window Number 1'''.&lt;br /&gt;
|&lt;br /&gt;
Now I will generate the '''Scilab''' code for the same.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the code file, we will write the code to connect the '''Slider''' and the '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result, the '''Text''' box will display the exact value of the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will also write a '''user-defined function''' to plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''Generate,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Generate GUI Code'''.&lt;br /&gt;
|&lt;br /&gt;
On the '''GUIBuilder Palette''' click on the '''Generate''' in the '''menu bar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on '''Generate GUI Code'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''uiputfile''' Window,&lt;br /&gt;
&lt;br /&gt;
type '''''parametric-2d'''''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
&lt;br /&gt;
Video-editor: Please put a textbox on screen. “In Windows OS, click on Save button.”&lt;br /&gt;
|&lt;br /&gt;
I will name this file as '''parametric-2d.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button to save it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''GUI Created '''Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
A '''dialog '''box''' '''appears and displays the message “'''GUI created successfully!”'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK.'''&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''SciNotes''' Window.&lt;br /&gt;
| The corresponding '''Scilab''' code opens.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.txt_radius'''.&lt;br /&gt;
| '''handles.txt_radius '''is the '''handle''' for the '''Text '''box.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.ax_radius'''.&lt;br /&gt;
| '''handles.ax_radius '''is the '''handle''' for the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight '''handles.sl_radius'''.&lt;br /&gt;
| '''handles.sl_radius '''is the '''handle''' for the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
cursor on '''sl_radius_callback''' Function.&lt;br /&gt;
|&lt;br /&gt;
Now let us write a function definition for '''sl_radius_callback '''function.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The function will basically link the '''Text '''box and the '''Slider'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Cursor on '''SciNotes''' window,&lt;br /&gt;
&lt;br /&gt;
within '''sl_radius_callback''' type,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''handles.txt_radius.string = string(handles.sl_radius.value)'''''&lt;br /&gt;
&lt;br /&gt;
'''''r = strtod(handles.txt_radius.string)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the code as shown here with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The same code can be found in a file in the '''Code files''' section on this video page.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
You can use it as explained earlier in this tutorial.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''handles.txt_radius.string = string(handles.sl_radius.value)'''&lt;br /&gt;
|&lt;br /&gt;
This line will assign the value of the '''Slider''' to the '''Text '''box'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes''' Window,&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''r = strtod(handles.txt_radius.string)'''&lt;br /&gt;
|&lt;br /&gt;
Next, we will assign the radius value from the '''Text''' box to a '''variable ‘r’.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Later on, we can use the '''variable ‘r'''’ while writing the equation of a circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
cursor on new line outside the '''sl_radius_callback''' function, type,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''''function ''''''plot_circle''''''()'''''&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
&lt;br /&gt;
'''''plot''''''(x,y)'''''&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
&lt;br /&gt;
'''''endfunction'''''&lt;br /&gt;
|&lt;br /&gt;
Further we will write a '''user defined function plot_circle()''' to plot the circle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type the code in the same way as before, with the same '''syntax'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can also be found in the '''Code files''' section.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''theta = 0:0.1:4*%pi'''''&lt;br /&gt;
|&lt;br /&gt;
First, we have defined the range of '''theta'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It will vary from '''0 to 4𝝅 '''with a step size of''' 0.1.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight, &lt;br /&gt;
&lt;br /&gt;
'''''x = r*cos(theta) '''''&lt;br /&gt;
&lt;br /&gt;
'''''y = r*sin(theta)'''''&lt;br /&gt;
| The next two lines define the '''parametric equation''' of the circle in terms of '''x''' and '''y'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''plot(x,y)'''&lt;br /&gt;
| The following line will plot the circle.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window,'''&lt;br /&gt;
&lt;br /&gt;
highlight,&lt;br /&gt;
&lt;br /&gt;
'''''xtitle('Plot of circle', 'X-axis', 'Y-axis')'''''&lt;br /&gt;
&lt;br /&gt;
'''''xgrid()'''''&lt;br /&gt;
| The next two lines are used to add labels and grid lines to the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Inside the '''sl_radius_callback Function '''type,&lt;br /&gt;
&lt;br /&gt;
'''plot_circle()'''&lt;br /&gt;
|&lt;br /&gt;
Let us call the '''plot_circle() '''function inside the '''callback function'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At the end of '''sl_radius_callback '''function definition type '''plot_circle()'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As a result, when we move the '''Slider''', the circle is plotted for each radius value.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
press '''Ctrl '''+''' S.'''&lt;br /&gt;
| Let us save the code by pressing '''Ctrl '''+''' S''' on the keyboard.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''Execute '''Button on '''menubar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
We will now execute the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Execute '''button on the '''menu bar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on '''File with echo.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The '''Graphic Window Number 2''' will appear.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
move the '''Slider'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
hover over '''Text''' box.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
move the '''Slider '''indicator on the right side'''.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
move the '''Slider '''indicator on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us move the indicator given on the '''Slider.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see that as we move the indicator, a circle is being plotted.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Notice the '''Text''' box. The value of the radius is also getting changed along with it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Moving the indicator towards the right increases the radius.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And moving the indicator towards the left decreases the radius.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Graphic Window Number 2''',&lt;br /&gt;
&lt;br /&gt;
hover over''' Axes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close '''Graphic Window Number 2'''.&lt;br /&gt;
|&lt;br /&gt;
But, the earlier responses are still visible. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us delete them by adding a single line.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This line is to be written at the start of '''plot_circle() function definition.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic Window Number 2'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Type within '''''plot_circle''''''()'''''''' '''function and then highlight,&lt;br /&gt;
&lt;br /&gt;
'''''delete(handles.ax_radius.children)'''''&lt;br /&gt;
|&lt;br /&gt;
Type the line as shown here with the same syntax.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This line deletes all the '''children '''of the current '''Axes'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here, '''children '''refers to the '''subplot''' of the '''Axes'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
Press '''Ctrl '''+''' S''' on the keyboard.&lt;br /&gt;
| Let us save the work by pressing '''Ctrl '''+''' S''' keys together.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SciNotes Window''',&lt;br /&gt;
&lt;br /&gt;
click on '''Execute,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''File with echo.'''&lt;br /&gt;
|&lt;br /&gt;
Let's go back to the '''menu bar''' and click on '''Execute''' and then on '''File with echo'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On''' Graphic Window Number 2,'''&lt;br /&gt;
&lt;br /&gt;
move the '''Slider '''indicator to the right and then on the left side'''.'''&lt;br /&gt;
|&lt;br /&gt;
Now move the '''Slider''' indicator to the right and then to the left side.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The earlier responses are now deleted and no longer visible.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So in this way, we can build a '''GUI '''for plotting a '''2D parametric '''curve in '''Scilab'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
Let us summarize.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this''' '''tutorial, we have:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment, please do the following.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{y = a}t^{2}&amp;lt;/math&amp;gt;,&amp;lt;math display=&amp;quot;block&amp;quot;&amp;gt;{x = 2}\mathit{at}&amp;lt;/math&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''About Spoken Tutorial Project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the '''Spoken Tutorial''' project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''TBC''' project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The '''FOSSEE''' team coordinates the '''Lab Migration project'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Acknowledgements'''&lt;br /&gt;
| The''' Spoken Tutorial''' project is funded by the '''Ministry of Education, Government of India'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show slide:&lt;br /&gt;
&lt;br /&gt;
'''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is '''Utkarsh Anand''', a '''FOSSEE''' intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Conditional-operations-in-Xcos/English</id>
		<title>Scilab/C4/Conditional-operations-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Conditional-operations-in-Xcos/English"/>
				<updated>2021-08-06T13:08:23Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: Created page with &amp;quot;'''Title of script''': Conditional operations in Xcos  '''Author: Rupak Rokade and Utkarsh'''  '''Keywords: Xcos, conditional operation, scilab, if-else, loops'''    {|border...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Conditional operations in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos, conditional operation, scilab, if-else, loops'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border = 1&lt;br /&gt;
| '''Visual Cue'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello and welcome to the Spoken Tutorial on “'''Conditional Operations in Xcos'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn how to:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
| To record this tutorial, I am using&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
|&lt;br /&gt;
To follow this tutorial, you should have :&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If not, then go through the '''Scilab''' spoken tutorials on this website.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Untitled Xcos''' window.&lt;br /&gt;
|&lt;br /&gt;
I have already opened the '''Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see two windows named '''Untitled Xcos''' and the '''Palette browser.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Untitled Xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''ConditionalOperations.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''Untitled Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the '''Downloads''' folder and select the file '''ConditionalOperations.xcos.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have already created this file for demonstration.&lt;br /&gt;
|-&lt;br /&gt;
| cursor on the '''ConditionalOperations.xcos '''window.&lt;br /&gt;
|&lt;br /&gt;
This file has a simple '''Xcos''' simulation diagram.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''ConditionalOperations.xcos window'''&lt;br /&gt;
|&lt;br /&gt;
Let us add conditional expressions to this file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To add conditional expressions we will use the '''Expression''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''user-defined-functions''' &amp;amp;gt;&amp;amp;gt; click on '''Expression.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''User-Defined-Functions''' section.&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''Expression''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''Expressio'''n block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''Expression''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos window''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Expression''' block.&lt;br /&gt;
| Double click on the''' Expression block''' to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on '''Number of Input''' textbox to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''1'''.&lt;br /&gt;
|&lt;br /&gt;
First is the '''number of inputs'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default it is '''2''' which means it can receive 2 input values. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us change it to '''1'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on '''scilab expression '''textbox to highlight it &amp;amp;gt;&amp;amp;gt; type '''(u1&amp;amp;gt;10)*1 .'''&lt;br /&gt;
|&lt;br /&gt;
Next, is the '''conditional expression'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the expression which will be evaluated by the '''Expression''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In '''Xcos, '''by default variables like '''u1, u2''' are used while writing the conditional expressions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us change the default expression.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Enter the expression as shown here.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the scilab''' expression '''textbox to highlight it.&lt;br /&gt;
|&lt;br /&gt;
This means that, if '''''u1 &amp;amp;gt; 10''''' then the block should return''' 1'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Scilab Multiple Request''' Window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
| Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on '''ConditionalOperations.xcos window'''&lt;br /&gt;
|&lt;br /&gt;
Let us display the output of the '''Expression''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this, we will use the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''sinks''' &amp;amp;gt;&amp;amp;gt; click on '''AFFICH_m.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''AFFICH_m''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''AFFICH_m''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''EXPRESSION''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''black output port''' of the '''EXPRESSION''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''black input port''' of the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''AFFICH_m '''block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the''' menu bar,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Simulation''' &amp;amp;gt;&amp;amp;gt; Click on '''Setup.'''&lt;br /&gt;
|&lt;br /&gt;
Before that, we need to change the execution time to Real time.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
On the '''menu bar''', click on '''Simulation.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Setup.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''Set parameters '''window''','''&lt;br /&gt;
&lt;br /&gt;
Change '''Real Time Scaling''' to 1 &amp;amp;gt;&amp;amp;gt; Click on '''OK''' button.&lt;br /&gt;
|&lt;br /&gt;
Change '''Real Time Scaling''' to '''1'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning Message.&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An '''Warning Message''' will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''AFFICH_m''' block.&lt;br /&gt;
|&lt;br /&gt;
We can see the '''AFFICH_m '''block displays '''0''' as long as the graph is less than '''10''' .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After the graph exceeds '''10''' the '''AFFICH_m''' block displays '''1'''.&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Graphic Window.'''&lt;br /&gt;
|&lt;br /&gt;
Suppose we want our simulation to end after some condition has been achieved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To do this, we will use the '''IFTHEL_f''' block. This is the '''IF-ELSE''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Close the '''Graphic Window.'''&lt;br /&gt;
| Let us close the '''Graphic window.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''Event-Handling''' &amp;amp;gt;&amp;amp;gt; click on '''IFTHEL_f.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Event Handling''' section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''IFTHEL_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''IFTHEL_f ''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''IFTHEL_f''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''IFTHEL_m '''block.&lt;br /&gt;
| Now, to halt the simulation we would need the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''Event-Handling''' &amp;amp;gt;&amp;amp;gt; click on '''HALT_f.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Event Handling''' section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
| Drag the '''HALT_f ''' block and drop it on the '''ConditionalOperations.xcos window.'''&lt;br /&gt;
| '''Drag and drop''' the '''HALT_f''' block on the '''ConditionalOperations.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''HALT_f '''block.&lt;br /&gt;
| The''' HALT_f '''block will end the simulation when the condition in the '''IFTHEL_f''' block is satisfied.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' EXPRESSION''' and the '''AFFICH_m''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select any of the '''red output ports''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the '''red input port''' of the '''HALT_f''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''ConditionalOperations.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''IFTHEL_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line entering the '''red input port''' of the '''AFFICH_m '''block'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning Message.&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation again by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An '''Warning Message''' will appear. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''ConditionalOperations.xcos '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''AFFICH_m '''block.&lt;br /&gt;
|&lt;br /&gt;
Observe that as soon as the value in the '''AFFICH_m''' block becomes '''1''', the simulation stops.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
So this way we can use conditional operations in '''Xcos'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
This brings us to the end of this tutorial. Let us summarise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create a '''Xcos''' Simulation file to:&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''About Spoken Tutorial project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
|&lt;br /&gt;
Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project.'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Textbook Companion project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We give Certificates and Honorarium to the contributors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Lab Migration project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Acknowledgement'''&lt;br /&gt;
| Spoken Tutorial and FOSSEE projects are funded by the Ministry of Education, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is Utkarsh, FOSSEE intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English</id>
		<title>Scilab/C4/Loading-and-saving-data-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English"/>
				<updated>2021-08-06T13:04:10Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Loading and saving data in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos,TOWS_c, C_binary, workspace, read, write, data file, scilab'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{| border=1&lt;br /&gt;
| '''Visual Cue'''&lt;br /&gt;
| '''Narration'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Title Slide'''&lt;br /&gt;
| Hello and welcome to the Spoken Tutorial on “ '''Loading and saving data in Xcos'''”.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Learning Objectives'''&lt;br /&gt;
|&lt;br /&gt;
In this tutorial, we will learn how to:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''System Requirements'''&lt;br /&gt;
| To record this tutorial, I am using&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Pre-requisites'''&lt;br /&gt;
| To follow this tutorial, you should have&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: &lt;br /&gt;
&lt;br /&gt;
'''Code Files'''&lt;br /&gt;
|&lt;br /&gt;
|-&lt;br /&gt;
| Cursor on the '''Untitled Xcos editing''' window.&lt;br /&gt;
|&lt;br /&gt;
I have already opened the '''Xcos''' windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can see two windows named '''Untitled Xcos''' and the '''Palette browser '''are opened'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Untitled Xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''SaveData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the '''Untitled Xcos''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the '''Downloads''' folder and select the file '''SaveData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
|&lt;br /&gt;
Let me adjust the window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I have already created this file for demonstration.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos '''window.&lt;br /&gt;
|&lt;br /&gt;
This file has a simple '''Xcos''' simulation diagram.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''RAMP''' block.&lt;br /&gt;
| It uses the '''RAMP''' block to generate a '''Ramp''' signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Hover cursor on '''CSCOPE''' block.&lt;br /&gt;
|&lt;br /&gt;
And the '''CSCOPE''' block to plot it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us see how to record the generated Ramp signal.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
cursor on the '''SaveData.xcos window'''&lt;br /&gt;
| First we will see how to push values generated by the '''RAMP''' block to '''workspace.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
click on '''Sinks''' &amp;amp;gt;&amp;amp;gt; scroll down &amp;amp;gt;&amp;amp;gt; click on '''TOWS_c.'''&lt;br /&gt;
|&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In the right panel, select the '''TOWS_c''' block. This is the '''To Workspace '''block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''SaveData.xcos '''window'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''editing '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''TOWS_c''' block.&lt;br /&gt;
| Double click on the '''TOWS_c''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Size of Buffer.''' Text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The size of buffer is by default set to '''128.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This means that 128 values will be saved in the block .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If any more values are passed, the block will overwrite the previous values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Variable Name''' text field to highlight it.&lt;br /&gt;
|&lt;br /&gt;
The '''Variable Name''' is the name of the variable to which the values are saved.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default it is set to '''A.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''TOWS_c''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Inherit''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button at the bottom.&lt;br /&gt;
|&lt;br /&gt;
'''Inherit''' is used to decide whether to take the event input or not.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default Inherit is set to '''0 '''which means it has to take event input.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''OK''' to close this window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''TOWS_c''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''TOWS_c '''block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the '''Warning message.'''&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An '''Warning message''' will appear. &lt;br /&gt;
&lt;br /&gt;
Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close the '''Graphic''' window.&lt;br /&gt;
|&lt;br /&gt;
We can see a straight line with slope 2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''workspace.'''&lt;br /&gt;
|&lt;br /&gt;
Now let us look at the values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Switch to the '''workspace'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''''A''''' &amp;amp;gt;&amp;amp;gt; press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Now let us execute the variable '''A'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Type '''A''' on the '''workspace''' and press '''Enter'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight '''variable A.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight '''values.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Highlight '''time.'''&lt;br /&gt;
|&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''A''' is a special variable.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We can either extract''' values''' from '''A''' or we can extract '''times '''from '''A.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let us look at the values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''' window,&lt;br /&gt;
&lt;br /&gt;
Type''''' A.values''''' &amp;amp;gt;&amp;amp;gt; Press '''Enter.'''&lt;br /&gt;
|&lt;br /&gt;
Type '''A.values''' on the '''workspace'''. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Press '''Enter.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
Scroll up to show all the values and Highlight them.&lt;br /&gt;
| These are all the values from the graph and are now saved in the workspace.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''workspace''',&lt;br /&gt;
&lt;br /&gt;
hover cursor on a new line on the workspace.&lt;br /&gt;
| Now we need to save these values in a file so that we can share them.&lt;br /&gt;
|-&lt;br /&gt;
| Switch to '''SaveData.xcos''' window.&lt;br /&gt;
| Let's switch back to the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser''',&lt;br /&gt;
&lt;br /&gt;
Click on '''Sinkss''' &amp;amp;gt;&amp;amp;gt; Click on '''WRITEC_f''' block.&lt;br /&gt;
|&lt;br /&gt;
To save the values, we will use the '''WRITEC_f '''block. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sinks''' palette.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the''' WRITEC_f''' block in the right panel. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is the '''Write to C binary file '''block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''SaveData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''WRITEC_f''' block.&lt;br /&gt;
| Double click on the '''WRITEC_f''' block to configure its properties.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request '''Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Size''' Text field to highlight it.&lt;br /&gt;
| '''Input Size''' is the size of our input values.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request '''Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output File Name''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''‘data’'''''&lt;br /&gt;
|&lt;br /&gt;
'''Output File''' is the name of our output file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I will name the output file as '''‘ data ‘'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If no file path is entered, the file will be saved in the '''Current working directory.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Output Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to ‘ '''d '''’&lt;br /&gt;
|&lt;br /&gt;
'''Output Format''' is the format of the output file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
By default it is '''‘ c ‘. '''That is, by default, values are saved as integers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But, I want to save the data values as '''double. '''So''',''' I will change it to''' ‘d’.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''WRITEC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
| '''Buffer Size''' is the size of the buffer.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request '''Window of '''WRITEC_f '''block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''OK''' button.&lt;br /&gt;
| &lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''black input port''' of the '''WRITEC_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' RAMP''' and the '''CSCOPE''' block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''SaveData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Next, Select the '''red input port''' of the '''WRITEC_f '''block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' CLOCK_c''' and the '''CSCOPE''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Our file is ready for simulation.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the''' SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the toolbar &amp;amp;gt;&amp;amp;gt; click on '''OK''' button on the Warning message.&lt;br /&gt;
|&lt;br /&gt;
Let's run the simulation again by clicking on the '''Start''' Button on the '''toolbar.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
An '''Warning message''' will appear. Ignore the message and click on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Graphic''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Hover cursor on the '''graph.'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Close '''the Graphic window.&lt;br /&gt;
|&lt;br /&gt;
We can see the graph.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Let’s close the graphic window.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration.&lt;br /&gt;
| Let's go to the location where we have saved the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''file manager window''',&lt;br /&gt;
&lt;br /&gt;
Click on the '''data''' file once.&lt;br /&gt;
|&lt;br /&gt;
We can see a file named '''‘ data ‘''' .&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since it is a binary encoded file we cannot simply read it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We would need a special block to read this file.&lt;br /&gt;
|-&lt;br /&gt;
| Switch back to '''SaveData.xcos''' file&lt;br /&gt;
| Let's switch back to the '''SaveData.xcos '''window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''SaveData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Cursor on '''Toolbar''' &amp;amp;gt;&amp;amp;gt; Click on '''Open file''' option &amp;amp;gt;&amp;amp;gt; Click on '''LoadData.xcos''' &amp;amp;gt;&amp;amp;gt; Click on '''OK'''&lt;br /&gt;
|&lt;br /&gt;
Let us open the file '''LoadData.xcos'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Open File''' icon on the '''Toolbar'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A window will appear.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to''' Downloads '''Folder and select the file '''LoadData.xcos'''.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Then click on the '''OK''' button.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We will use this file to read our data file.&lt;br /&gt;
|-&lt;br /&gt;
| Adjust the Window accordingly.&lt;br /&gt;
| Let me adjust the window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''palette browser,'''&lt;br /&gt;
&lt;br /&gt;
Click on '''Sources''' &amp;amp;gt;&amp;amp;gt; Click on '''READC_f '''block.&lt;br /&gt;
|&lt;br /&gt;
We will use the '''READC_f''' block to read our values.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Go to the''' palette browser''' window.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on the '''Sources''' palette.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on''' READC_f '''Block in the right panel.&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
This is the '''Read from C Binary''' block.&lt;br /&gt;
|-&lt;br /&gt;
| As per narration&lt;br /&gt;
| '''Drag and Drop''' the block on the '''LoadData.xcos''' window.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos''' window,&lt;br /&gt;
&lt;br /&gt;
Double click on '''READC_f '''block..&lt;br /&gt;
| Double click on the '''READC_f '''block''' '''to configure its properties'''.'''&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input File Name '''Text field to highlight it. &amp;amp;gt;&amp;amp;gt; Change it to '''''data'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input file''' name is the name and the path of your data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since my data file was named '''data''' I will change it to '''data'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Input Format''' Text field to highlight it &amp;amp;gt;&amp;amp;gt; Change it to '''''d.'''''&lt;br /&gt;
|&lt;br /&gt;
'''Input format''' is the format of the data file.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Since the format for my data file is '''double''' , I will change it to '''d'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''Scilab Multiple Values Request''' Window of '''READC_f''' block,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Double click on the '''Buffer Size''' Text field to highlight it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click the '''OK''' button .&lt;br /&gt;
|&lt;br /&gt;
This is the buffer size.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Close this window by clicking on the '''OK''' button.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Let us make the connections.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Select the '''black output port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the''' black input port '''of the '''CSCOPE '''block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On '''LoadData.xcos Window''',&lt;br /&gt;
&lt;br /&gt;
Connect as per narration'''.'''&lt;br /&gt;
|&lt;br /&gt;
Lastly, Select the '''red input port''' of the '''READC_f''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Connect it to the line joining the''' CLOCK_C '''&amp;amp;amp; the''' CSCOPE '''block.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the '''LoadData.xcos '''window,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Click on '''Start''' button on the '''toolbar'''&lt;br /&gt;
|&lt;br /&gt;
Let us run this simulation by clicking on the '''Start''' Button on the '''toolbar'''.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
On the''' Graphic''' Window,&lt;br /&gt;
&lt;br /&gt;
Hover Cursor on the '''Graph.'''&lt;br /&gt;
|&lt;br /&gt;
We have a similar graph to the one we had earlier without using the '''RAMP''' block.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is because we have loaded the values from the data file.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Summary'''&lt;br /&gt;
|&lt;br /&gt;
This brings us to the end of this tutorial. Let us summarise.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we have learnt to:&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Assignment'''&lt;br /&gt;
|&lt;br /&gt;
As an assignment,&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Create two '''Xcos''' simulation files:&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''About Spoken Tutorial project'''&lt;br /&gt;
|&lt;br /&gt;
The video at the following link summarises the Spoken Tutorial project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Please download and watch it&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Spoken Tutorial Workshops'''&lt;br /&gt;
|&lt;br /&gt;
The Spoken Tutorial Project team conducts workshops and gives certificates.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please write to us.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Answers for THIS Spoken Tutorial'''&lt;br /&gt;
| Please post your timed queries in this forum.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''FOSSEE Forum'''&lt;br /&gt;
| Please post your general and technical queries on '''Scilab''' in this forum.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide:&lt;br /&gt;
&lt;br /&gt;
'''Textbook Companion project.'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Textbook Companion project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
We give Certificates and Honorarium to the contributors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Lab Migration'''&lt;br /&gt;
|&lt;br /&gt;
The FOSSEE team coordinates the Lab Migration project.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For more details, please visit this site.&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
Show Slide: '''Acknowledgement'''&lt;br /&gt;
| Spoken Tutorial and FOSSEE projects are funded by the Ministry of Education, Government of India.&lt;br /&gt;
|-&lt;br /&gt;
| Show Slide: '''Thank you'''&lt;br /&gt;
|&lt;br /&gt;
This is Utkarsh Anand, FOSSEE intern 2021, IIT Bombay signing off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Thanks for joining.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	<entry>
		<id>https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English</id>
		<title>Scilab/C4/Loading-and-saving-data-in-Xcos/English</title>
		<link rel="alternate" type="text/html" href="https://script.spoken-tutorial.org/index.php/Scilab/C4/Loading-and-saving-data-in-Xcos/English"/>
				<updated>2021-08-06T12:51:29Z</updated>
		
		<summary type="html">&lt;p&gt;Utkarsha: Created page with &amp;quot;'''Title of script''': Loading and saving data in Xcos  '''Author: Rupak Rokade and Utkarsh'''  '''Keywords: Xcos,TOWS_c, C_binary, workspace, read, write, data file, scilab''...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Title of script''': Loading and saving data in Xcos&lt;br /&gt;
&lt;br /&gt;
'''Author: Rupak Rokade and Utkarsh'''&lt;br /&gt;
&lt;br /&gt;
'''Keywords: Xcos,TOWS_c, C_binary, workspace, read, write, data file, scilab'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|-&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
''' '''&lt;/div&gt;</summary>
		<author><name>Utkarsha</name></author>	</entry>

	</feed>