Ask Question, Ask an Expert

+1-415-315-9853

info@mywordsolution.com

Ask MATLAB Expert

problem1) Create a MATLAB function called problem3 that finds the root of an equation numerically using the following recursive formula:

xn+1= xn– f(xn)/g(xn) , for n =1,2,3,……

where g(xn) = (f(xn  +f(xn ))-f(xn  ))/f(xn ) . This iterative procedure should stop when the absolute difference between xn andxn+1is less than a given tolerance epsilon. The function must accept as inputs , a scalar function ‘f’, an initial number ‘x’ and a positive number ‘epsilon’ to terminate the procedure. Hence use this numerical technique to find the root of the equation ex –x2 =0

problem2) Let St be the price of one share of a particular company at time t. If the price St+1 at time t+1 can wither take the value of uStwith probability p1 (where u>1), remain the same with probability p2 or go down to dStwith probability 1-p1-p2 (where 0t}t=020for given u, d, p1,p2 and plot St against t. Hence, by counting the number of paths, find out the probability that S6 = S0u2d3 . Do this by using the command rand.

problem3) Suppose you are at a casino playing roulette and that you are betting on black to turn up. You start by betting 1 euro. If you win bet another 1 euro in the next game. If you lose you double your previous bet. You will stop playing when you have either won at least 10 euros or lost more than 100 euros. Create a script file called problem6 to simulate this system. Then play the game 5000 times and record your performance. Use the command rand.

problem4) A Legendre polynomial of degree n is given by the following expression:

Pn(x) = (1/2nn!)*(dn/dxn)*(x2-1)n

where(dn/dxn)f is the nth derivative of function f.

(a) Generate the first four polynomials and use the command subplot to plot the resulting graphs. Use the different colours and symbols for the plots

(b) create a Matlab function called legendrepolynomial which for given inputs n and m find outs the integral

∫Pn(x)Pm(x) dx

using the trapezoid rule with a suitability chosen number of gridpoints. Comment on the output obtained.

Note: Limits of integral from -1 to 1

problem5) A Eulerian number Pn,kis the number of permutations p1p2….pn of the numbers 1,2,….,n in which there are k places with pjj+1. For ex P3,1= 4 because there are four permutations having one ascent which hare 132,213,231,312. This number can be generated using the following recurrence relation

Pn,0 = 1 for all n>=0

Pn,k= 0 for all k>=n

Pn,k= (k+1)Pn-1,k+ (n-k)Pn-1,k-1  for all k=1,2,…..,n-1

(a) create a function called euleriannumber which generates a Eulerian number for a given n and k

(b) create a script file called euleriannidentity which calls the function euleriannumber and then verifies the identity

∑in = ∑Pn,k(m+k+1 , n+1)

for given m,n and k, where (m+k+1 , n+1) = (m+k+1)!/((n+1)!*(m+k-n)!)

note: limits of in= from i=1 to m

limits of Pn,k(m+k+1 , n+1) = from k=0 to n-1

MATLAB, Engineering

  • Category:- MATLAB
  • Reference No.:- M9874

Have any Question? 


Related Questions in MATLAB

It is desired to design a power electronic system referred

It is desired to design a power electronic system, referred to as ‘the device' in below, which has the following specifications: - The device is supplied from a single-phase wall outlet which has a 240 V rms, 50 Hz speci ...

Algorithms assignmentthe following 3 tasks are to be

Algorithms Assignment The following 3 tasks are to be completed for Homework 1 - using the following MATLAB syntax for the script file "bike.m" 1) Write additional syntax to create an INPUT variable named time and prompt ...

Consider the signal vt given belowwrite a matlab script to

Consider the signal v(t) given below. Write a MATLAB script to do the following (a) Display v(t) and v(2t-1) in window 1 by using subplot. (b) Display both the even component and odd component of v(t) in window 2 by usin ...

1obtain the uncoded ber performance of bpsk modulation over

1. Obtain the uncoded BER performance of BPSK modulation over AWGN and Rayleigh fading channels through computer simulation. Select a suitable range of Eb/NO so that you obtain the BER in the range of (approximately) 10 ...

1 you are testing a theory which says that the output

1. You are testing a theory which says that the output displacement of a measurement device should vary with time according to the equation: D(x) = {x 2 cos (x)} / (x +1) So far, you have measured the following set of ex ...

Provide matlab code as per the research paperresearch paper

Provide MATLAB code as per the research paper. Research paper - Decimeter-Level Localization with a Single WiFi Access Point We present Chronos, a system that enables a single WiFi access point to localize clients to wit ...

Problem 1 the two foremost aerospace companies in the usa

PROBLEM 1: The two foremost aerospace companies in the USA are Lockheed and Boeing. They often compete for government contracts. A major factor in awarding a contract is the claimed reliability of the given system to be ...

Part -1introduction to programming with matlab1 the

Part -1: Introduction to Programming with MATLAB 1. The function move_me is defined like this: function w = move_me(v,a). The first input argument v is a row-vector, while a is a scalar. The function moves every element ...

Labobjectiveslearn how to create vectors and matrices in

Lab Objectives ? Learn how to create vectors and matrices in MATLAB ? Become familiar with some of the built-in MATLAB functions and how they work Deliverables ? Submit your pre-lab answers in Bblearn under the Lab 2 pre ...

Question 11 introductionmeasurements have been made of a

Question 1: 1 Introduction: Measurements have been made of a cantilever beam's deflection (stored in the file ass2q1in.csv). You must determine what type of loading has been applied and the magnitude of the load. There a ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

A cola-dispensing machine is set to dispense 9 ounces of

A cola-dispensing machine is set to dispense 9 ounces of cola per cup, with a standard deviation of 1.0 ounce. The manuf

What is marketingbullwhat is marketing think back to your

What is Marketing? • "What is marketing"? Think back to your impressions before you started this class versus how you

Question -your client david smith runs a small it

QUESTION - Your client, David Smith runs a small IT consulting business specialising in computer software and techno

Inspection of a random sample of 22 aircraft showed that 15

Inspection of a random sample of 22 aircraft showed that 15 needed repairs to fix a wiring problem that might compromise

Effective hrmquestionhow can an effective hrm system help

Effective HRM Question How can an effective HRM system help facilitate the achievement of an organization's strate