- CBSE 2015 All India QN. PAPER WITH SOLUTION
- Israel for Stan
- Ariane Theoretical Manual
- DEE Curriculum Final 2014
- Calculus 2 Summary
- Euler Integrals
- maths handbook-jeemain.guru.pdf
- Maths 0580 candidate response sample answers booklet
- EEC 652 DSP Lab
- ￼Spline Solutions to L1 Extremal Problems in One and Several Variables
- JEE Advanced Syllabus 2015.pdf
- lesson plan
- Yearly Lesson Plan Add Math F5
- Ylp Ad Math f5 05012017
- part 3 - formative and summative assessments and rubrics - tom merse
- Statics Review Slides 2
- 22
- hmw3
- fn_assgn
- sol_5_fall_04

You are on page 1of 4

Date : 8/1/2019

AIM:

To plot basic functions in scilab simulator : Sin, Cos, Tan, Unit Impulse, Unit Ramp,Unit Step,

Square Wave, Sawtooth wave, Triangular Wave.

THEORY:

Basic functions are plotted using either in-built function or by hardcoding algorithms.

FLOWCHART/ALGORITHM:

Note – Sin, Cos, Tan functions were plotted directly using the in-built functions of the scilab

Unit Step : The value on y-axis for (x >= 0) is set to 1 and 0 for (x < 0).

Unit Impulse : The value on y-axis is set to 1 for (x = 0) ; else set to 0.

Unit Ramp : for (x < 0) y = 0 ; else y = x

Square wave : Alternative sets of time periods (length 1 sec each), value of y axis were to set to

either 1 or 0 depending on the value of the variable “flag”

Sawtooth wave : for each set of time period (length 1 sec each), y = x was plotted.

PROGRAM:

t = -10 : 0.1 : 10; // domain

y1 = sin(t); //sin function

y2 = cos(t); //cos function

y3 = tan(t); //tan function

subplot(3,3,1)

plot(t,y1)

xlabel('time')

ylabel('sin')

subplot(3,3,2)

plot(t,y2)

xlabel('time')

ylabel('cos')

subplot(3,3,3)

plot(t,y3)

xlabel('time')

ylabel('tan')

//Unit Impulse

y4 = zeros(1,length(t));

for i = 1 : 1 : length(t)

if(t(i) == 0)

y4(i) = 1;

end

end

subplot(3,3,4)

plot(t,y4)

xlabel('time')

ylabel('impulse')

//Unit Step

y5 = zeros(1,length(t));

for i = 1 : 1 : length(t)

if(t(i) >= 0)

y5(i) = 1;

end

end

subplot(3,3,5)

plot(t,y5)

xlabel('time')

ylabel('unit step')

y6 = zeros(1,length(t));

for i = 1 : 1 : length(t)

if(t(i) >= 0)

y6(i) = (i-100)/10;

end

end

subplot(3,3,6)

plot(t,y6)

xlabel('time')

ylabel('unit ramp')

// Square Wave

y7 = zeros(1,length(t));

flag = 1;

for i = 1 : 10 : length(t)

if(i < 201)

if(flag == 1)

for j = i : 1 : i+10

y7(j) = 1;

flag = 0;

end

else

for j = i : 1 : i+10

y7(j) = 0;

flag = 1;

end

end

end

end

subplot(3,3,7)

plot(t,y7)

xlabel('time')

ylabel('square')

// Saw-tooth wave

y8 = zeros(1,length(t));

for i = 1 : 10 : length(t)

if(i<length(t))

x1 = t(i);

for j = i : 1 : i+10

y8(j) = t(j) - x1;

end

end

end

subplot(3,3,8)

plot(t,y8)

xlabel('time')

ylabel('Saw-tooth')

// Triangular wave

y9 = zeros(1,length(t));

for i = 1 : 10 : length(t)

if(i<length(t))

x2 = t(i);

for j = i : 1 : i+5

y9(j) = 2 * t(j - (x2*10));

y9(j+5) = -y9(j);

end

end

end

subplot(3,3,9)

plot(t,y9)

xlabel('time')

ylabel('Triangular')

RESULT:

- CBSE 2015 All India QN. PAPER WITH SOLUTIONUploaded byFaris Hamsa
- Israel for StanUploaded byRachel Breen
- Ariane Theoretical ManualUploaded byZulham Mochtar
- DEE Curriculum Final 2014Uploaded bySanjiv Mainali
- Calculus 2 SummaryUploaded bydukefvr41
- Euler IntegralsUploaded byDuncan Scott Bennie
- maths handbook-jeemain.guru.pdfUploaded byAditya
- Maths 0580 candidate response sample answers bookletUploaded byuzair200253
- EEC 652 DSP LabUploaded byShitansh Nigam
- ￼Spline Solutions to L1 Extremal Problems in One and Several VariablesUploaded byconkermaniac
- JEE Advanced Syllabus 2015.pdfUploaded byKarthik
- lesson planUploaded byRosnani Resdi
- Yearly Lesson Plan Add Math F5Uploaded byjustin poh
- Ylp Ad Math f5 05012017Uploaded byHasnol Esham
- part 3 - formative and summative assessments and rubrics - tom merseUploaded byapi-242802487
- Statics Review Slides 2Uploaded byHasen Bebba
- 22Uploaded byAhmedovicMichael
- hmw3Uploaded byNectaria Gizani
- fn_assgnUploaded byGarry Garg
- sol_5_fall_04Uploaded byDaniel Cervantes Cabrera
- observation 1 pc ivesUploaded byapi-251840029
- Iit Jee SyllabusUploaded byPrateek Chitre
- Rpt Math t Sem 1 2012Uploaded byFatin Mady
- mmbits3Uploaded byapi-19908948
- Solomon DUploaded bynishit0157623637
- Kertas 1Uploaded byjuliet84
- Trig Gen04Uploaded byKirti Gupta
- 11 Secant Tangent and Tangent Tangent AnglesUploaded byLoljaha Hahalol
- mc-ty-doubleangle-2009-1Uploaded byapi-213604106
- S3 Math Summary (Math summer assignment).pdfUploaded byElston Pang

- OTE_Outotec_Mineral_Processing_Solutions_eng_web.pdfUploaded byAndi Faesal
- Module 3 SupplementalUploaded byTrent Branch
- Zanotto 2010-Amer Ceramic Soc Bull-A Bright Future for Glass-ceramics (2)Uploaded bybugoff700
- PL2303 User Installation ManualUploaded byHardi Rahman
- Making the Grid SmarterUploaded bySowham Chatterjee
- Optical Flat and InterferometryUploaded bysreehari
- 1384496991Uploaded byHoney Kullar
- D5 – 06Uploaded byian_bang_3
- Strategic Management - M & aUploaded byGio Perdana
- Users GuideUploaded byChristine_Yu_3102
- HCI Chapter 1Uploaded byvinayal47
- Tips on Filling the PMP Application Form @ the Definitive PMP GuideUploaded byHenry Ezeilo
- Amazons_resources_and_competences.pdfUploaded byNiveydan
- PresentationUploaded byMuhammad Bilal
- Produktkatalog 10 10 Englisch PDF OptUploaded byOprisor Costin
- MID TER EXAM-10Uploaded bysaira tahir
- SAP Goods Issue Procedure(www.erpbizz.com)Uploaded byamit.ahiniya4398
- Ferco Arc LrUploaded bySiddarth Madan
- FAIAC.pdfUploaded bydropbear2007
- Chap 6- Grounding and ShieldingUploaded byShashesh Silwal
- KR26X_N-NH_PR_ENUploaded byvicerose
- 1) PlanningUploaded byAkshay Mehta
- the 1920s u s history unit planUploaded byapi-280940037
- Fintech Startup, SavR, Launches Kickstarter Campaign to Tackle Big Problem Head OnUploaded byPR.com
- Tower Tray oil and gas industryUploaded byHeet Patel
- Electrical SymbolsUploaded byDmark Kram Ned
- MPLS VPN TroubleshootingUploaded byhem777
- ErwinUploaded by_WilliamS_
- MAN Diesel & TurboUploaded byRimshah
- The Most Evolved Ascii TabUploaded byYoshimaru Hoshii Heiwa Mms