Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN: 9780133594140
Author: James Kurose, Keith Ross
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
I need help to generate the waveform s
v is a
Generate the digital waveform s. Let the bit period be 50 ps i.e. 20 Gbits/s. Let there be 10 samples/bit in this simulation i.e. the samples are spaced 5 ps apart andsis 10 times longer thanv. Each bit invis multiplied to 10 samples in s
below is my scripts, please help
import numpy as np
import matplotlib.pyplot as plt
import sys
import random
vector_Len = 10**5
v = 2*np.random.randint(low = 0, high = 2, size = vector_Len) -1
random.shuffle(v)
s = v[:10]
Subject: Python Programming
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 4 steps with 2 images
Knowledge Booster
Similar questions
- You have the following vector x. You can copy and paste this directly into Matlab or octave online. x = [614 6421361333415455411346236116625352552342 43462322433422523224355133513432333444513452 3644552454565325421324432554254213]' Use the reshape command to reshape the vector x into a square matrix, find the determinant of the resulting matrix.arrow_forwardI am making a train with some number of cars, that will be printed using Unicode characters. I am I am trying to build this method named getUnicodeString based on its specification. It needs a for-loop to generate the rail cars.Specification: /** * Builds a unicode train consisting of an engine, * followed by getNumCars() railcars, followed by a * caboose. A train will always have at least an engine * and a caboose. * * @return a Unicode string as described above. */My code so far: public String getUnicodeString() { // replace the return statement with your solution return null; }}arrow_forwardWrite a python program. Add a function called reverse() that outputs a DNA strand in reverse. Example: reverse(AATC) returns CTAA Note: you should not use the built-in reverse method.arrow_forward
- Using javascript Simulate rolling two dice by getting two random integers from 1 to 6.a. Count how many rolls it takes to get doubles. Show each roll of the dice (both dice on the same line).b. Separately, i.e. using a separate loop from part (a), count how many rolls it takes to get values that add up to 7. Show each roll of the dice (both dice on the same line).arrow_forwardUsing coding Here you are asked to implement the method by dividing the aperture into a finitenumber of segments. Use a unit system where lengths are measured as multiples ofthe wavelength of the incident light, λ. Assume that the index of refraction n = 1.00can be used for air.Further assume that the horizontal distance between source and aperture X is somelarge multiple of λ, and that the same distance is assumed between aperture anddetector screen.Assume that the aperture size a is some small multiple of the wavelength.a) Compute the probability amplitude for the central detector height yd = 0 byusing three paths (i) one going directly from source (at height ys = 0, i.e., on the xaxis, via yi = 0 (at the aperture) towards the detector screen;(ii) then for two straight-line paths: one going via yi = a/2, and one vie yi = −a/2.The result should be three complex numbers. Show that these are unit-magnitudecomplex numbers.b) Calculate the relative probability for arrival at the detector…arrow_forwardWrite Python commands, within a print command, that output the following. (E.g. print(list(range(10))) , in spyder (vi) Let x = [1,3,5] and let y = [2,4,6]. If we interpret these as vectors x and y then the vector sum can be written x + y = [x[0]+y[0],x[1]+y[1],x[2]+y[2]]. Find an the equivalent expression for the vector dot product x⋅y. (vii) With x,y as above find an expression for the vector cross product x * y.arrow_forward
- Make A Dice Simulator in Python. First, we import the library that allows us to choose random numbers. import random Now, we can generate a random number and save it in a variable, We will call it rolled Python library random has a function called randint (). The randint (min number, max number) requires 2 parameters (the lowest number and the highest number between we will pick our number randomly). In this case, our dice goes between 1-6. rolled = random.randint (1,6) If we want to show our selected number, we can use print (). Your code should look like this: import random rolled - random.randint(1,6) print(rolled) Nice, we already have our main engine working, now it's time to make it look more appealing. To do that we will add some improvements (we will use a new variable to store random generated numbers - rolled_num) import random rolled num - random.randint(1,6) print("You rolled: ", rolled num) If we run the code again, we should see a little message and the random number. Our…arrow_forwardI need to write a palindrome Java program. Given a string of letters, it should find the minimum number of letters that need to be removed from the string, so that a reordering of the letters will result in a palindrome (a word that reads the same backwards as it does forwards. Such as racecar or tacocat. The given sample while loop for this is final Scanner stdin = new Scanner(System.in, "US-ASCII"); while (stdin.hasNext()) { final String s = stdin.next(); } A sample input is in the attached picturearrow_forwardThis code has a delay in the loop, during which time the user inputs will be ignored. So, please modify it and implement a solution that would trigger the needed function when there is an input. // Pin numbers written on the board itself do not correspond to Aurdino pinnumbers.Constants are defined to make using this board easierconst uint8_t BTN_PIN = 2;const uint8_t LED_PIN = 13;//assigning button;s previous state and LedSate to LOWuint8_t buttonPrevState = LOW;uint8_t ledState = LOW;//defining a new functionvoid setup(){// Assigning the types of input parameterspinMode(BTN_PIN, INPUT_PULLUP);//Assigning the types of output parameterspinMode(LED_PIN, OUTPUT);//begin of process detailsSerial.begin(9600);}void loop(){//assigning button state to be read modeuint8_t buttonState = digitalRead(BTN_PIN); //To print the following in output windowSerial.print(buttonState);Serial.print(buttonPrevState);Serial.print(ledState);Serial.println(""); //check if the button state presently is same…arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Computer Networking: A Top-Down Approach (7th Edi...Computer EngineeringISBN:9780133594140Author:James Kurose, Keith RossPublisher:PEARSONComputer Organization and Design MIPS Edition, Fi...Computer EngineeringISBN:9780124077263Author:David A. Patterson, John L. HennessyPublisher:Elsevier ScienceNetwork+ Guide to Networks (MindTap Course List)Computer EngineeringISBN:9781337569330Author:Jill West, Tamara Dean, Jean AndrewsPublisher:Cengage Learning
- Concepts of Database ManagementComputer EngineeringISBN:9781337093422Author:Joy L. Starks, Philip J. Pratt, Mary Z. LastPublisher:Cengage LearningPrelude to ProgrammingComputer EngineeringISBN:9780133750423Author:VENIT, StewartPublisher:Pearson EducationSc Business Data Communications and Networking, T...Computer EngineeringISBN:9781119368830Author:FITZGERALDPublisher:WILEY
Computer Networking: A Top-Down Approach (7th Edi...
Computer Engineering
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:PEARSON
Computer Organization and Design MIPS Edition, Fi...
Computer Engineering
ISBN:9780124077263
Author:David A. Patterson, John L. Hennessy
Publisher:Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:9781337569330
Author:Jill West, Tamara Dean, Jean Andrews
Publisher:Cengage Learning
Concepts of Database Management
Computer Engineering
ISBN:9781337093422
Author:Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:Cengage Learning
Prelude to Programming
Computer Engineering
ISBN:9780133750423
Author:VENIT, Stewart
Publisher:Pearson Education
Sc Business Data Communications and Networking, T...
Computer Engineering
ISBN:9781119368830
Author:FITZGERALD
Publisher:WILEY