You may use your programming of choice to implement and simulate. Please turn in the code, simulation, and a description of what is going on in the simulation.
In: Electrical Engineering
I want you to solve the below statement that about Electric field and dielectric refraction.
The question is to Explain the behavior of electric field in the interface of two insulation materials of different relative permittivity.
In: Electrical Engineering
Design a power supply to deliver 4 to 9 Vdc adjustable voltage to control DC motor speed. Motor power at maximum load is 20W at maximum speed (maximum voltage). Supply is 12V car battery with 70Ah capacity. How long the battery will last at maximum load and maximum speed? Add a 13.8Vdc communications power supply to continuously charge the battery at 500mA.
In: Electrical Engineering
this program is to be done in c language. Using Pointers Create a program pointerTester.c to experiment with pointers. Implement the following steps one by one in your program: YOU NEED TO ANSWER QUESTION Use printf to print your answers at the end(after 12). 1. Declare three integer variables a, b and c. Initialize them to 0, 100 and 225, respectively. 2. Print the value of each variable and its address. 3. Add the following declaration to your code: int *pA = &a, *pB = &b, *p; 4. Print the value of each pointer and the value it points to (using the pointer) 5. Run your program multiple times. a. Does any of the values *pA, *pB or *p change? b. Does any of the values pA, pB or p change? 6. Change the value that p points to to 50 without declaring the valuable that p points to. Can you print the value that p points to? 7. Declare an array z of 10 integers and initialize its elements to 0, 1, 2, …., 9 8. Print the address of each element in the array using the z[i] notation 9. Print the address of each element in the array using the z + i notation 10. Print the content of the array using z + i notation 11. Declare a string literal x and set it to value “hello”. 12. Change the second character of x to upper case. What happens? Strings Write a program reading.c that reads from standard input according to the user’s choice. The program should ask “How would you like to read?” 1: character by character; 2: word by word; 3: line by line. Default: print “Invalid choice”. You should write the three procedures below. - The procedure readCharByChar asks the user to enter 5 characters and read them (hint: using %c). - The procedure readWordByWord asks the user to enter 5 words and read them (hint: using %s). - The procedure readLineByLine should ask the user to enter 5 lines and read them (hint: using gets). In each of the three procedures, the values read should be printed to the screen, each on a separate line showing: input index, tab, unit (char, word, or line). According to the user choice, your program uses a switch statement to call readCharByChar, readWordByWord, and readLineByLine, respectively. Make sure your code is properly indented, your variables have meaningful names, and macro definitions are used when appropriate.
In: Electrical Engineering
How does temperature affect the band structure and the I-V characteristics of semiconductor devices?
How does changing the carrier lifetime affect semiconductor devices?
For a GaAs PN junction, imagine that the device is to be used as a photo-diode. What width of intrinsic layer would you want to design the device with if the photons only absorb in the depletion/intrinsic regions? Assume: wavelength = 0.75um.
In: Electrical Engineering
RE: Circuits, Third Edition, Problem 10P
Please explain why the frequency response of the scaled circuit is different from the prototype circuit. According to the textbook, magnitude scaling has no effect on the frequency response.
In: Electrical Engineering
E10.15 Use the LTC1661 from Linear Technology to generate a two-frequency square wave
from the VOUTA pin. The frequency alternates between 1 and 4 kHz every 4 s.
In: Electrical Engineering
In: Electrical Engineering
On the internet (e.g., the Micron Technologies web site) find the access time and size of a state-of-the-art
a) DRAM chip
b) SRAM chip
c) FLASH chip
In: Electrical Engineering
Details on how you can test for risk and conduct a security assessment using CCTV security camera? Also, explain the risk mitigation?
In: Electrical Engineering
In: Electrical Engineering
Determine the Fourier transform of a Gaussian pulse defined as x(t) = e?t2. Plot both x(t) and X(?).
In: Electrical Engineering
the filament of an incandescent lamp sits between two
In: Electrical Engineering
Complete the function main in file median.c to implement the computation of the median of a sequence of integers read from stdin. The program should use realloc to allow an arbitrary number of integers to be read into a dynamically allocated array. Every time realloc is called, let the new size of the array be twice the old size plus 1. Look at function readLongLine in the slides for Chapter 6 for an example of how to use realloc. The program should return -1 if anything other than an integer is read from stdin. A test script is provided in test_median.sh.
Note that median.c uses qsort from the standard library to sort the array of integers. We have not seen how to call qsort yet, so don't worry if it still looks mysterious. It involves passing a function pointer, which we shall cover shortly.
Here is the function
#include <stdio.h>
#include <stdlib.h> /* for realloc, free, and qsort */
/*
* Read integers from stdin until EOF. Then
* print the median of the numbers read.
*/
/*
* Print the median of a sequence of sorted integers.
*/
void printMedian(int const * numbers, int cnt) {
int i, halfWay;
double median;
/* debugging printout of sorted array */
for (i = 0; i < cnt; i++) {
printf("%d%c", numbers[i], i == cnt-1 ? '\n' : '
');
}
halfWay = cnt / 2;
if (halfWay * 2 == cnt) {
/* cnt is even: average two middle numbers
*/
median = 0.5 * (numbers[halfWay] +
numbers[halfWay-1]);
} else {
/* cnt is odd: take middle number */
median = numbers[halfWay];
}
printf("Median of %d integers: %g\n", cnt, median);
}
/* Integer comparison function for qsort. */
static int icompare(void const * x, void const * y) {
int ix = * (int const *) x;
int iy = * (int const *) y;
return ix - iy;
}
int main(void) {
/* Size of allocated array. */
size_t size = 0;
/* Number of ints stored in the array. Must be less
* than or equal to size at all times. */
size_t cnt = 0;
/* Pointer to dynamically allocated array. */
int * numbers = 0;
/* Variables used by scanf. */
int num, ret;
while ((ret = scanf("%d", &num)) != EOF) {
/* Your code here. */
}
if (!numbers) {
printf("Read no integers. Median
undefined.\n");
return -1;
}
/* Sort numbers in ascending order. */
qsort(numbers, cnt, sizeof(int), icompare);
printMedian(numbers, cnt);
free(numbers);
return 0;
}
How do I go about finishing this? This is in C language remember that.
In: Electrical Engineering