20 views

Uploaded by Nirneya Gupta

save

You are on page 1of 6

and 300. Name the array x.

b) Append the same array with 3 other elements all having values 1.

c) Pad the array with 4 zeros.

d) Limit the number of elements in the array to 5 elements.

e) Display the 2nd and the 3rd element of the array at the command prompt.

f) Make a two dimensional array of size 3*3. Call it x3d.

g) Display the 2nd row 3rd column element of the array at the command prompt

h) Find the transpose of this matrix and display both the 3*3 matrices. Call it x3dc.

What happens when I use the same command to the 3d array x3d. . j) Make an array containing 100 elements from 1 to 100 in steps of 1 k) Make an array containing 100 elements from 1 to 500 in steps of 5 l) Find the lengths of both the recently created arrays.i) Find the sum of the array elements in x (the one -dimensional array created before).

II Getting used to functions to abs. (Using exp or e) . sqrt and exp a) Find the square root of a positive number and store it in a variable called xsqrt. c) Note the difference in the values stored in xsqrt and xsqrt1. Obtain the number again from the user. d) Find the abs value of xsqr1 and store that in the same variable Instruction: Result: c) Store the velocity of light in a variable called c. b) Find the square root of a negative number and store it in a variable called xsqrt1. Obtain the positive number from the user.

c) Obtain grids on your plot.d) Obtain 10 random elements using rand function III Create a simple sine function and Plot it a) Create a sine wave and assign it to a variable and plot it. Sketch the result obtained on screen here. . d) Obtain multiple sine plots of different frequency on the same plot. b) Label your plot and label the axes. Obtain the frequency of the sine wave for this question from the user. e) Obtain these multiple plots on different subplots in the same figure.

f) What is the maximum frequency of the sine wave that you can plot for a given number of sample/period? IV To get used to control functions a) Generate a random array of 100 elements. b) If the 50th or the 100th element of x is odd. then make parity=1 c) Set a counter that counts the number of odd elements in x and x1. d) Check how many elements in x and x1 are multiples of 6 . Call it x. Also generate another 100-element array containing values from 1 to 100 in steps of 1 and call it x1.

e) Generate a random sequence of binary digits using rand function and applying 0. b) Call this function from a main function .5 as threshold value. V To create functions and call and execute them a) Create a function that counts the number of multiples of 3 in an array. Call it mult3.

- 2015-Rph Matematik BmUploaded bystudentmbs
- Array Lattice FiltersUploaded bykalpana0210
- Cs602 Mid Term 1 Www.vu786.ComUploaded byESNA678
- SARAWAKZONASPM2008MATHSTRIALP2Uploaded bySean Gomez
- hw02Uploaded bylewiebachelier
- A162(1).pdfUploaded byAliff Iqbal Mazufil Hanim
- How to Build MatrixUploaded bymanachmai
- javaUploaded byJasmandeep brar
- Algebraic f3Uploaded byanisseri
- Summer School 14 Assignment 2Uploaded bymrtyldz
- ECE GATE PAPER 19 ANSWERSUploaded byAnjaneyulu Bodhanapu
- MTH102 Linear AlgebraUploaded byEisa Mohd
- Matlab IntroUploaded byVale Miles
- MGM.02.4.LiteracyUploaded bypandoraradio22
- EN(16)Uploaded byreacharunk
- Summer 2018Uploaded bySumit Kumar
- Power system analysis(Lecture 2).pdfUploaded bygokul sarker
- Prezentare Job Mapping.pptUploaded byAnca_Berbece
- 9_VectorsAndMatricesUploaded byMohammed Abdallah
- Jsu t5 k1 & k2 Matematik_trial12Uploaded bySuriani Sayuaakhi
- Biology ProjectUploaded byBhagat Bhandari
- C++ AssignmentsUploaded byartwaniparas
- B.Sc. (Mathematics)-Sem.1 & 2-(2010-11)Uploaded bySumanth Boddu
- Intro to R Lecture 2Uploaded byDanny DeWitt
- An analysis of IIT JEE.pdfUploaded bysukande
- SVD and Spectral AnalysisUploaded bylatec
- Exercise 12.28Uploaded byLeonard Gonzalo Saavedra Astopilco
- ScaraUploaded byAnand Kumar Mishra
- Cambridge IGCSE Mathematics - Core & Extended, 3rd EditionUploaded byAnderson Alfred
- Eigens by Row(1)Uploaded byJeeva Jp

- 2015-Rph Matematik BmUploaded bystudentmbs
- Array Lattice FiltersUploaded bykalpana0210
- Cs602 Mid Term 1 Www.vu786.ComUploaded byESNA678
- SARAWAKZONASPM2008MATHSTRIALP2Uploaded bySean Gomez
- hw02Uploaded bylewiebachelier
- A162(1).pdfUploaded byAliff Iqbal Mazufil Hanim
- How to Build MatrixUploaded bymanachmai
- javaUploaded byJasmandeep brar
- Algebraic f3Uploaded byanisseri
- Summer School 14 Assignment 2Uploaded bymrtyldz
- ECE GATE PAPER 19 ANSWERSUploaded byAnjaneyulu Bodhanapu
- MTH102 Linear AlgebraUploaded byEisa Mohd
- Matlab IntroUploaded byVale Miles
- MGM.02.4.LiteracyUploaded bypandoraradio22
- EN(16)Uploaded byreacharunk
- Summer 2018Uploaded bySumit Kumar
- Power system analysis(Lecture 2).pdfUploaded bygokul sarker
- Prezentare Job Mapping.pptUploaded byAnca_Berbece
- 9_VectorsAndMatricesUploaded byMohammed Abdallah
- Jsu t5 k1 & k2 Matematik_trial12Uploaded bySuriani Sayuaakhi
- Biology ProjectUploaded byBhagat Bhandari
- C++ AssignmentsUploaded byartwaniparas
- B.Sc. (Mathematics)-Sem.1 & 2-(2010-11)Uploaded bySumanth Boddu
- Intro to R Lecture 2Uploaded byDanny DeWitt
- An analysis of IIT JEE.pdfUploaded bysukande
- SVD and Spectral AnalysisUploaded bylatec
- Exercise 12.28Uploaded byLeonard Gonzalo Saavedra Astopilco
- ScaraUploaded byAnand Kumar Mishra
- Cambridge IGCSE Mathematics - Core & Extended, 3rd EditionUploaded byAnderson Alfred
- Eigens by Row(1)Uploaded byJeeva Jp
- ELE2120_tuto11Uploaded byNirneya Gupta
- Electronics LabUploaded byNirneya Gupta
- lec15Uploaded byNirneya Gupta
- DSP_30_08_2013Uploaded byNirneya Gupta
- DSP_02_09_2013Uploaded byNirneya Gupta
- l-1_AICD-LEC1Uploaded byNirneya Gupta
- CIF_L26Uploaded byNirneya Gupta
- VRCH RISC 1Uploaded byNirneya Gupta
- AssignmentUploaded byNirneya Gupta
- MIPSIt-1Uploaded byNirneya Gupta
- RP Handout 2 SEM 12-13Uploaded byNirneya Gupta
- Cad for IcMEL G641 484[1]Uploaded byNirneya Gupta
- Assignment 1Uploaded byNirneya Gupta
- MEL G632Uploaded byNirneya Gupta
- Abortion.partial BirthUploaded byNirneya Gupta
- AbstractUploaded byNirneya Gupta
- aUploaded byNirneya Gupta
- View ContentUploaded byNirneya Gupta
- 1Uploaded byNirneya Gupta

- ELE2120_tuto11Uploaded byNirneya Gupta
- Electronics LabUploaded byNirneya Gupta
- lec15Uploaded byNirneya Gupta
- DSP_30_08_2013Uploaded byNirneya Gupta
- DSP_02_09_2013Uploaded byNirneya Gupta
- l-1_AICD-LEC1Uploaded byNirneya Gupta
- CIF_L26Uploaded byNirneya Gupta
- VRCH RISC 1Uploaded byNirneya Gupta
- AssignmentUploaded byNirneya Gupta
- MIPSIt-1Uploaded byNirneya Gupta
- RP Handout 2 SEM 12-13Uploaded byNirneya Gupta
- Cad for IcMEL G641 484[1]Uploaded byNirneya Gupta
- Assignment 1Uploaded byNirneya Gupta
- MEL G632Uploaded byNirneya Gupta
- Abortion.partial BirthUploaded byNirneya Gupta
- AbstractUploaded byNirneya Gupta
- aUploaded byNirneya Gupta
- View ContentUploaded byNirneya Gupta
- 1Uploaded byNirneya Gupta