summaryrefslogtreecommitdiff
path: root/Tutorial2/Scilab_code/Tutotial2_plotting.sce
diff options
context:
space:
mode:
authorChayan Bhawal2018-09-27 11:04:57 +0530
committerChayan Bhawal2018-09-27 11:04:57 +0530
commitdef3641770c8797c52ccef0840685fded209bfaa (patch)
tree0eee5ac05cc44e825eaf9505fd1954f91ea59a43 /Tutorial2/Scilab_code/Tutotial2_plotting.sce
parent45a65e87fd94819ea5353f56ec2470422578f03c (diff)
downloadscilab-tutorials-def3641770c8797c52ccef0840685fded209bfaa.tar.gz
scilab-tutorials-def3641770c8797c52ccef0840685fded209bfaa.tar.bz2
scilab-tutorials-def3641770c8797c52ccef0840685fded209bfaa.zip
Tutorial1_plotting
Diffstat (limited to 'Tutorial2/Scilab_code/Tutotial2_plotting.sce')
-rw-r--r--Tutorial2/Scilab_code/Tutotial2_plotting.sce20
1 files changed, 20 insertions, 0 deletions
diff --git a/Tutorial2/Scilab_code/Tutotial2_plotting.sce b/Tutorial2/Scilab_code/Tutotial2_plotting.sce
new file mode 100644
index 0000000..4b0fe59
--- /dev/null
+++ b/Tutorial2/Scilab_code/Tutotial2_plotting.sce
@@ -0,0 +1,20 @@
+//This script demonstrate plotting in Scilab
+clear
+clc
+
+//Import data from file
+Data = csvRead('/home/chayan/Documents/scilab-tutorials/Tutorial2/Data/Tut2_data1.csv');
+
+//Segregate the data into variables
+y = Data(:,1);
+x1 = Data(:,2);
+x2 = Data(:,3);
+x3 = Data(:,4);
+x4 = Data(:,5);
+
+//Plotting y versus x1
+plot(y,x1);
+
+//For labelling axes and adding a title to the plot
+xtitle('Plot of y versus x1','Time','Length');
+