MatLAB | Mathematica | MathCAD | Maple Answers

Questions: 124

Answers by our Experts: 124

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

1. The Legendre polynomials Pn(x), n = 0, 1, … are defined recursively as follows

nPn(x) = (2n-1)xPn -1 – (n-1)Pn-2(x), n = 2, 3, … , P0(x) = 1, P1(x) = x

a) Write MATLAB function P = LegendP(n) that takes an integer n (the degree of Pn(x)) and returns its coefficient stored in the descending order of powers.
b) Plot all Legendre polynomials Pn(x), n = 0, 1, …,6 over the interval [-1,1] in one figure.
The Pascale triangle holds coefficients in the series expansion of (1 + x)n, where n = 0, 1, 2, … The top of this triangle, for n = 0, 1, 2, is shown here
1
1 1
1 2 1
Write MATLAB function t = pasctri(n) that generates the Pascal triangle t up to the level n.
Remark. Two-dimensional arrays in MATLAB must have the same number of columns in each row. In order to avoid error messages you have to add a certain number of zero entries to the right of last nonzero entry in each row of t but one. This t = pasctri(2).

t =
1 0 0
1 1 0
1 2 1
is an example of the array t for n = 2.
Consider a simple polymer, which consists of long chains of simple molecules attached to each other, for example: ..CH[2]-CH[2]-CH[2]-... If the interaction energy between consecutive sections can beignored or is low enough, the chains can be bend around at various places to form various configurations. let us make model of a simple polymer which is restricted to lie within a two-dimensional plane. one can start by fixing the first section to a particular coordinate and then add additional components by use of random walk with the condition that it may not intersect itself. it should be clear that when forming a polymer in this way, it can happen that you end up in a cul-de-sac, i.e. you can not add an additional component to lengthen it further, without intersecting with itself. when this happens the polymer is terminated. a general outline of the algorithm would be as follow: initialize an array that would be keep track of all the positions of the random walker start the random walk at a given coordinate after each move, the array storing the visited positions needs to be updated while it is still possible to add extra components to the polymer repeat the following "(*)" select a new direction randomly check whether the new move is allowed, by looking wether that coordinate has been visited before. if the new move is allowed, take it, and update the array. if the new move is not allowed, return to "(*)"and select a new random number when no more additional components can be added, stop the loop. 1. write a program to simulate the formulation of polymers as outlined above, by use of self-avoiding random walk. let it start at the origin, and let the walker have equal propability to movein any of the four directions: up, down, left or right. 2. repeat the move above lgorithm many times (without ploting ), to obtain a histogram on the polymer lengths that result from this simple model. also calculate the average length of all the polymers.
1- Develop a user- defined function that will return the phasor form of complex vector. In addition, the user-defined function will indicate which quadrant the phasor vector is in.
All inputs to the executive will be via the input function. The executive program will pass the rectangular coordinates of the vector to the user-defined function through the arguments.
if the arch is shaped according to this equation y= 693.8 - 68.8 cos h (x/99.7) ft
Make a plot of the arch for -299.25≤x≤299.95 ft
in Matlab
The initial conditions are y(t = 0) = 2 and dy(t = 0)/dt = 0. The file VdP with the resulting right hand side
has been coded up for the given equation. Solve the equation for t = [0 : 0.01 : 32] using ode45. Is this the right code to solve for y(t)?
y0 = [2; 0];
[t,y1]=ode45(@VdP,[0:0.01:32],y0);
A4 = y1(:,1);
Write a script that will load data from a file into a matrix. I am confused on how to load data files and call functions in matlab.
The question is:9) Use the 'bar' function (see Matlab help) to generate a bar plot showing weight as a function of drug treatment for males and females. Label the plot.
I was just wondering how I can make 1 bar graph showing data for males and female?
i(t)=(V/R) * (1-e^-(R/L)(t))

(a) Defi ne an anonymous function answerE that returns i(t) given input t.
(b) The final value for the current is 2 amps. Find a time tm when the
current is at least 99% of the nal value but strictly less than 2. Store
this value in the variable answerF.
(c) Create a vector in answerG using linspace with ten evenly spaced
elements where 0 as the first element and tm as the last element.
(d) Create a vector in answerH which contains the current at each time in
vector answerG.
Hi,
I am working on my project on matlab where I have to divide an array of size 1X711000 in to subarrays of size of 1X100.
Can I use the command mat2cell command for it?
Please give the proper command for it.
LATEST TUTORIALS
APPROVED BY CLIENTS