A soumis


Magic Time Step in 1D FDTD
1D FDTD illustration using magic time step

plus de 10 ans il y a | 253 téléchargements |

0.0 / 5
Thumbnail

A soumis


Explicit Numerical Methods to solve Differential Equation
Here , I compare Euler, Runge-Kutta and Adam-Bashforth methods to integrate a simple function.

plus de 10 ans il y a | 379 téléchargements |

5.0 / 5
Thumbnail

A soumis


Analytical plot of Dielectric function of Lorentz medium
This code plots complex dielectric function of a Lorentz medium using its analytical formula.

plus de 10 ans il y a | 525 téléchargements |

5.0 / 5
Thumbnail

A soumis


Total Field Scattered Field source with Perfectly Matched Layer Boundaries
In this code, TF/SF source is implemented for 1D FDTD source along with PML Boundary condition.

presque 11 ans il y a | 450 téléchargements |

0.0 / 5
Thumbnail

A soumis


Optical Spectra of Dielectric slab using 1D Finite Difference Time Domain (FDTD).
This code calculates Transmission and Reflection spectra of Etalon slab using FDTD method.

presque 11 ans il y a | 386 téléchargements |

0.0 / 5
Thumbnail

A soumis


1D Finite Difference Time Domain simulation (FDTD) with Perfectly Matched Layer (PML)
FDTD is illustrated with PML absorbing boundary condition at both ends of 1D space grid.

presque 11 ans il y a | 1428 téléchargements |

0.0 / 5
Thumbnail

A soumis


Optical Linear Absorption of a Two Level System
In this code, differential equation for optical polarization is solved.

presque 11 ans il y a | 209 téléchargements |

0.0 / 5
Thumbnail

A soumis


Band structure of GaAs using Parabolic Approximation
Band structure of GaAs using Parabolic Approximation

presque 11 ans il y a | 591 téléchargements |

0.0 / 5
Thumbnail

A soumis


Fourier transform DFT for selected range of frequencies
For selected frequency range, DFT is computed.

presque 11 ans il y a | 225 téléchargements |

0.0 / 5
Thumbnail

A soumis


Numerical Solution to Optical Bloch Equation for a two level atom using Runge Kutta method
Numerical Solution to Optical Bloch Equation for a two level atom using Runge Kutta method

environ 11 ans il y a | 1063 téléchargements |

4.5 / 5
Thumbnail

A soumis


Simulation of Rabi Flopping in a Two Level Atom using Finite Difference Method
Rabi flopping for a two level quantum system is simulated for different detuning frequencies.

environ 11 ans il y a | 473 téléchargements |

5.0 / 5
Thumbnail

A soumis


Excited States of Quantum Harmonic Oscillator using Raising Operator
Calculating Excited States of Quantum Harmonic Oscillator using Raising Operator.

environ 11 ans il y a | 973 téléchargements |

5.0 / 5
Thumbnail

A résolu


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

plus de 11 ans il y a

A résolu


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

plus de 11 ans il y a

A résolu


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

plus de 11 ans il y a

A résolu


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

plus de 11 ans il y a

A résolu


Add two numbers
Given a and b, return the sum a+b in c.

plus de 11 ans il y a

A résolu


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

plus de 11 ans il y a

A résolu


Create a two dimensional zero matrix
You have to create a zero matrix of size (mxn) whose inputs are m and n and the elements of your matrix should be zeros. Exam...

plus de 11 ans il y a

A résolu


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

plus de 11 ans il y a

A résolu


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

plus de 11 ans il y a

A résolu


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

plus de 11 ans il y a

A résolu


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

plus de 11 ans il y a

A résolu


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

plus de 11 ans il y a

A résolu


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

plus de 11 ans il y a

A résolu


Make one big string out of two smaller strings
If you have two small strings, like 'a' and 'b', return them put together like 'ab'. 'a' and 'b' => 'ab' For extra ...

plus de 11 ans il y a

A résolu


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

plus de 11 ans il y a

A résolu


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

plus de 11 ans il y a

A résolu


Create a row array using double colon operator
Create a row array from 9 to 1, using the double colon operator.

plus de 11 ans il y a

A résolu


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

plus de 11 ans il y a

Charger plus