You are on page 1of 5

Indian institute of technology

(ISM)
Dhanbad-826004

ASSIGNMENT-1

Subject: Mathematical and Simulation Technique

Submitted by: Submitted to:

RAKHI SINGH Asst. Prof. Govind Murmu

RF and Microwave Engineering

19MT0313

1
OBJECTIVE: Program to generate sinusoidal signal.
clc;
close all;
clear screen;
f=input('Enter frequency f=');
a=input('Enter amplitude a=');
t=0:0.01:1;
x=a*sin(2*pi*f*t);
plot(t,x);
axis([0 1 -10 10]);
ylabel('amplitude');
xlabel('time');
title('sinusoidal signal')

OUTPUT 1:

2
OUTPUT 2:

3
OBJECTIVE:Program to implement Newton Raphson method.

clc;
clear all;
a=input('Enter the function f(x)=','s');
x(1)=input('Enter Initial Guess:');
error=input('Enter allowed Error:');
f=inline(a)
dif=diff('sym(a)');
d=inline('dif');
fori=1:100
x(i+1)=x(i)-((f(x(i))/d(x(i))));
err(i)=abs((x(i+1)-x(i))/x(i));
if err(i)<error
break
end
end
root=x(i)

OUTPUT:

4
5

You might also like