program to write a sine function for an input x between (0,1)
Answers
Answer:
The C sin Function is a C Math Library Function, used to calculate the Trigonometry Sine value for the specified expression. The syntax of the sin in C Programming is
double sin(double number);
The SIN function in C will return the value between -1 and 1. Before we get into the syntax of a SIN function in C, Let us see the mathematical formula behind this Trigonometry Sine function:
Program to plot sine function for an input x between (0,1)
x= 0: 0.1 : 1
y= sin(x)
plot2d(x,y,leg="sin(x)")
Detailed Information:-
Scilab is a programming language used to perform various scientific and numerical computations. It can be used to plot complex functions. MATLAB is an advanced version to perform scientific calculations.
Steps to writing code to plot sine function:-
- Open Scilab.
- Write this code in the editor window.
- The first line of the program is used to provide an interval for the sine function
- sin(x) is an inbuilt function in Scilab. It takes its input from the value of x defined in the first line.
- Use plot2d command to graph the sinx function.
link for similar functions:-
https://brainly.in/question/3070398
#SPJ3