0% found this document useful (0 votes)
9 views1 page

Scilab Exercises for Numerical Solutions

This document outlines Exercise #7 for TCPC 531, requiring students to solve various numerical problems using Scilab. Tasks include generating 2D plots for rainfall data, creating plots for trigonometric functions, and visualizing an exponentially decaying sine function. Students must submit their Scinotes file along with screenshots of their graphs, ensuring proper labeling and titles.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views1 page

Scilab Exercises for Numerical Solutions

This document outlines Exercise #7 for TCPC 531, requiring students to solve various numerical problems using Scilab. Tasks include generating 2D plots for rainfall data, creating plots for trigonometric functions, and visualizing an exponentially decaying sine function. Students must submit their Scinotes file along with screenshots of their graphs, ensuring proper labeling and titles.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

1

TCPC 531 – Numerical Solutions to CE problems


1ST SEM, AY 2024–2025

Name: Date:
Section:

EXERCISE #7

Solve these problems using Scilab. Write your name and section in scilab and include
also the problems. Use Scinotes in coding not console. Submit in BS the scinotes file
and the compilation of Graphs. You can screenshot the Graphs and then paste it on
word. On the title of all plots include “create by ___________(your name)”.

1.) Generate a 2D plot using the SCILAB for the rainfall data on station nearest your home
location from the Pagasa data in the link provided.
a. Edit the color, marker type of the 2D plot on your preference.
b. X-axis is the month and Y-axis is the rainfall.
c. Include x-title, y-title and Plot title
Rainfall Data Link: [Link]
2.) a. Create a vector theta (θ) with a linearly spaced 100 elements long vector. (Hint: Use the
start value 0, increment value 2π and end value 100 with built-in function linespace).
b. Calculate x and y – coordinates (use, x = cos (theta) and y = sin (theta)).
c. Plot x vs y
d. Give the title of the plot as “PLOT CREATED BY YOUR NAME ______________” using
the built-in function xtitle and label x-axis as „x‟ and y - axis as „f(x)‟. Use the function
xgrid and show the grid lines in the plot
3.) Plot y = sin x, 0 ≤ x ≤ 2π, taking 100 linearly spaced points in the given interval. Label
the axes and put plot title as “A simple sine plot”. Use the function xgrid and show the
grid lines in the plot.
4.) Make the same plot as given in the problem 3. But rather than displaying the graph as a
curve, show unconnected data point. To display the points with small circles, use the
built-in function plot(x, y, ’o’)

5.) Plot an exponentially decaying sine plot: 𝑦 = 𝑒-0.4x sin 𝑥, 0 ≤ 𝑥 ≤ 4𝜋, taking 100 points
interval. [Be careful about computing y. you need array multiplication between e (-0.4*x)
and sin(x) [i.e. term-by-term or element-by-element operations].
3 2
6.) Create a heart plot using the equation 𝑥 2 + (𝑦 − √𝑥 2 ) = 1 ; Use -1 ≤ x ≤ 1

You might also like