Tutorial06 - City University of Hong Kong Electronic...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: City University of Hong Kong Electronic Engineering Semester B 2007-2008 EE3108 Engineering Analysis Tutorial 6 Numerical differentiation is often needed to treat problems that involve iterative solutions. Consider the following characteristic equation that governs a propagation parameter x of optical waveguides: x V 2 − x2 , tan = 2 x where V is a design parameter related to the wavelength, the waveguide thickness, and the index of refraction. The propagation parameter x is related to the velocity of wave propagation. Its derivative dx/dV is related to the dispersion of waves. This tutorial aims to arrive at a plot of dx/dV. In doing so, we need to first find x over a range of values of V. I. Iteration solution of x The solution of x for any given V can be obtained iteratively. Modify the following files in order to plot x against V. The function file wg_x(V) should be an user-defined function based on the Newton’s method. %Function for waveguide equation function out=wg_x(V) x=1e-2; d=5e-4; % fx = -sqrt(V^2-x^2)/x+tan(x/2); df_dx = x = error = out=x % %file: t0601 clear; V=[1:0.01:3]; % plot(V,x); xlabel('V'); ylabel('x'); EE 3108 Semster B 2007/2008 T6-1 S C Chan II. Numerical differentiation The first-order derivative can be performed using the centered difference technique. Modify the following script file to plot dx/dV against V. %file: t0602 clear; V=[1:0.01:3]; % m=length(V); h=(V(m)-V(1))/(m-1); %Centered difference for i=1:m if elseif else end end %Plot plot(V,Dx); xlabel('V'); ylabel('dx/dV'); % 1.9 0.75 1.8 0.7 1.7 0.65 1.6 0.6 1.5 0.55 dx/dV 1.4 0.5 x 1.3 0.45 1.2 0.4 1.1 0.35 1 0.3 0.9 0.25 1 1.2 1.4 1.6 1.8 2 V 2.2 2.4 2.6 2.8 3 1 1.2 1.4 1.6 1.8 2 V 2.2 2.4 2.6 2.8 3 T6-2 ...
View Full Document

This note was uploaded on 01/11/2011 for the course EE 3108 taught by Professor Nelsonszechunchan during the Spring '07 term at City University of Hong Kong.

Page1 / 2

Tutorial06 - City University of Hong Kong Electronic...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online