STA5107_FRADE_HW7

STA5107_FRADE_HW7 - STA5107 Dr Srivastava Homework 7 Jaime...

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

View Full Document Right Arrow Icon
STA5107: Dr. Srivastava Homework 7 Jaime Frade 1. OUTPUT a) Plot f(x) over the interval [-4,10] b) f(x) = exp(-1/2*a^2)+2*exp(-1/2*(a-3)^2)+exp(-1/2*(a-6)^2) f’(x) = -a*exp(-1/2*a^2)+2*(-a+3)*exp(-1/2*(a-3)^2)+(-a+6)*exp(-1/2*(a-6)^2) c) See code
Background image of page 1

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

View Full DocumentRight Arrow Icon
STA5107: Dr. Srivastava Homework 7 Jaime Frade d)
Background image of page 2
STA5107: Dr. Srivastava Homework 7 Jaime Frade
Background image of page 3

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

View Full DocumentRight Arrow Icon
STA5107: Dr. Srivastava Homework 7 Jaime Frade
Background image of page 4
STA5107: Dr. Srivastava Homework 7 Jaime Frade CODE %part a and part b clear all ; clc; close all % Part (a) x=[-4:0.1:10]; for i=1:length(x) Fx(i)=exp(-x(i).^2/2)+2*exp(-(x(i)-3).^2/2)+exp(-(x(i)-6).^2/2); end plot(x,Fx) % Part (b) syms a Fa=exp(-a.^2/2)+2*exp(-(a-3).^2/2)+exp(-(a-6).^2/2) diff(Fa,a) % Part c and d % % Homework 8.1 % Part c and d sigma=0.1; T = 1; N = 1000; run_times = 50; alpha = 0.995; t_small = zeros(1, run_times); for index = 1:run_times x = zeros(1, N + 1); x(1) = 10*randn; for t = 1:N y_t = x(t) + sigma*f_prime_func(x(t)) + sqrt(T*sigma)*randn; rho = min(exp((f_func(y_t) - f_func(x(t)))/T), 1);
Background image of page 5

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

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

This note was uploaded on 12/14/2011 for the course STAT 5107 taught by Professor Staff during the Fall '09 term at FSU.

Page1 / 11

STA5107_FRADE_HW7 - STA5107 Dr Srivastava Homework 7 Jaime...

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

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