diff options
author | Chayan Bhawal | 2018-10-02 10:19:33 +0530 |
---|---|---|
committer | Chayan Bhawal | 2018-10-02 10:19:33 +0530 |
commit | 3d0c890de4ac7d9afd576e889bd2624437d79c70 (patch) | |
tree | 10bf164ddb34ffcc5c4b059e2968990b4e472d2f /Tutorial01-Basics | |
parent | 6d39446c434cfcca02ae7a4551e2d66edf9def7f (diff) | |
download | scilab-tutorials-3d0c890de4ac7d9afd576e889bd2624437d79c70.tar.gz scilab-tutorials-3d0c890de4ac7d9afd576e889bd2624437d79c70.tar.bz2 scilab-tutorials-3d0c890de4ac7d9afd576e889bd2624437d79c70.zip |
Renamed_files_relative_path
Diffstat (limited to 'Tutorial01-Basics')
-rw-r--r-- | Tutorial01-Basics/Problems/Tut01.pdf (renamed from Tutorial01-Basics/Problems/Tut1.pdf) | bin | 67566 -> 67735 bytes | |||
-rw-r--r-- | Tutorial01-Basics/Problems/Tut01.tex | 23 | ||||
-rw-r--r-- | Tutorial01-Basics/Scilab_code/Tutorial1_filehandling.sce (renamed from Tutorial01-Basics/Scilab_code/Tutotial1_filehandling.sce) | 4 |
3 files changed, 26 insertions, 1 deletions
diff --git a/Tutorial01-Basics/Problems/Tut1.pdf b/Tutorial01-Basics/Problems/Tut01.pdf Binary files differindex 24abc4f..41890eb 100644 --- a/Tutorial01-Basics/Problems/Tut1.pdf +++ b/Tutorial01-Basics/Problems/Tut01.pdf diff --git a/Tutorial01-Basics/Problems/Tut01.tex b/Tutorial01-Basics/Problems/Tut01.tex new file mode 100644 index 0000000..e7318ee --- /dev/null +++ b/Tutorial01-Basics/Problems/Tut01.tex @@ -0,0 +1,23 @@ +\documentclass[10pt,a4paper]{article} +\usepackage[utf8]{inputenc} +\usepackage{amsmath} +\usepackage{amsfonts} +\usepackage{amssymb} +\begin{document} +\title{Problems for Tutorial-01: Basics of Scilab} +\date{} +\maketitle +\begin{enumerate} +\item Write a Scilab script to compute the following: +\begin{enumerate} +\item $n_1 = \sqrt{(Ax - y)^T(Ax - y)}$ +\item $n_2 = $ Sum of elements of $(Ax-b)$ (Hint: Use sum command) +\item $n_3 = $ Sum of square of the elements of $(Ax - b)$ (Hint: Use for loop) +\end{enumerate} +where $A = \begin{bmatrix}a & a^2 & a^3\\b & b^2 & b^3\\c & c^2 & c^3\end{bmatrix}$, +$a = 1, b = 2, c = 3$, $x = \begin{bmatrix}1\\1\\1\end{bmatrix}$, +$y = \begin{bmatrix}4\\12\\36\end{bmatrix}$. +\item Write a Scilab script to save the solution of Problem $1$, i.e., +$\begin{bmatrix}n_1 & n_2 & n_3\end{bmatrix}$ as Problem2.csv file. +\end{enumerate} +\end{document}
\ No newline at end of file diff --git a/Tutorial01-Basics/Scilab_code/Tutotial1_filehandling.sce b/Tutorial01-Basics/Scilab_code/Tutorial1_filehandling.sce index 2924f03..8942278 100644 --- a/Tutorial01-Basics/Scilab_code/Tutotial1_filehandling.sce +++ b/Tutorial01-Basics/Scilab_code/Tutorial1_filehandling.sce @@ -20,4 +20,6 @@ stdev_of_x= mystdev(x,mean_of_x); //Data to be exported (It can be a scalar, vector or matrix) data_to_write = [mean_of_x stdev_of_x]; //Export data to a csv file -csvWrite(data_to_write,'../Data/Tut1_data3.csv') +csvWrite(data_to_write,'../Data/Result.csv') + + |