1 / 12

MATLAB: toolboxes, technical calculations

MATLAB: toolboxes, technical calculations. Numeric integration (1). Evaluating integral: computing a surface below a curve. Numeric integration (2). Creating m-file, which contains the integrated function. function y = sinc( x , a )

nishi
Download Presentation

MATLAB: toolboxes, technical calculations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MATLAB:toolboxes, technical calculations

  2. Numeric integration (1) • Evaluating integral:computing a surface below a curve

  3. Numeric integration (2) • Creating m-file, which containsthe integrated function function y = sinc( x, a) % the function has to return a vector of functional values y % for the vector of input numbers x y = log( x+a) .* sin( x)./( x+0.1);

  4. Numeric integration (3) • Performing integration by standard m-functionquadl function out = integ( low, up) out = quadl( 'sinc', low, up, 1e-5, [], 0.5);

  5. Symbolic integration • Symbolic Math Toolbox:m-function int syms x a l u y = int( log( x+a) .* sin( x)./( x+0.1), x, l, u) y = simple( y) pretty( y)

  6. Numeric differencing (1) • Differencing performed by standardm-function diff h = 0.01; % sampling step y = sinc( 0:h:1, 0.5); y1 = diff( y) / h; y2a = diff( y1) / h; y2b = diff( y, 2) / h^2;

  7. Numeric differencing (2)

  8. Symbolic differencing • Symbolic Math Toolbox:m-function diff syms x a y1 = diff( log( x+a) .* sin( x)./( x+0.1), 'x', 1) y1 = simple( y1) pretty ( y1) y2 = diff( log( x+a) .* sin( x)./( x+0.1), 'x', 2) y2 = simple( y2) pretty( y2)

  9. Optimization Toolbox (1) • Searching for such A, B, h, r so thatthe input impedance is Z = (200 + j 0) on the frequency f = 30 GHz

  10. Optimization Toolbox (2) • Formulating fitness function:how does the optimized structure fit demands

  11. Optimization Toolbox (3) • Creating m-file,which contains the fitness function function out = mstrip( x) global net Tmax Rd Xd Z = Tmax * sim( net, x); % input impedance of the dipole out = ((Rd-Z(1,:)).*(Rd-Z(1,:)) + (Xd-Z(2,:)).*(Xd-Z(2,:)))';

  12. Optimization Toolbox (4) • Performing optimization by OptimizationToolbox m-function fminunc function x = toolbox global net Tmax Rd Xd load dip_616; % loading the antenna model Rd = 200; % desired value of input resistance Xd = 0; % desired value of input reactance x0 = [ 5.00; 0.05; 2.00; 1.25]; % A, B, eps, h x = fminunc('mstrip', x0)

More Related