You have written the imaginary symbol "i" wrongly in your code. Replace it with a capital "I" or alternatively use the mathematica symbol for an imaginary number, which you can get by typing Esc, ii, Esc (Esc is the button Esc on the keyboard).
Try either method and you should get the code to work.
Use the Table[..] function to do the loop.
First use Table[NDSolve[...],{i,Length[arr]}] to get an array of solutions for the parameters you want, where 'arr' is an array storing your parameters.
Then just do a similar loop for your plot. ie. Table[Plot[...],{i,Length[solArr]}], where solArr...
I have an optimization problem which I cannot seem to solve in Mathematica as the computation time takes too long, and I'm wondering whether things would improve if I performed the same task on a program such as Matlab?
The task is to find the maximum of a non-linear function (the function is...
Ok, so is there any general method to show that a solution exists (or dosn't exist) to a system of non linear equations? What would the best approach be?
If I had a linear system of algebraic equations, then I can relate the number of unknowns to the number of equations to determine if a solution exists. However, does this criteria carry over to nonlinear equations?
For example, I have a set of m>2 non linear equations and I have 2 unknowns...
Basically, f(x1,x2) is a http://en.wikipedia.org/wiki/Multivariate_normal_distribution" . An example in Mathematica code would be:
f(x) = "Integrate[PDF[MultinormalDistribution[{5,6}, {{1,1}, {1,2}}], {x1,x2}], {x1,x,c},{x2,x,c}]"
For any particular value of x and c (c is a known constant) I...
Unfortunately f(x) has no closed form solution (so the expression for f(x) still has the symbols x1, x2) and thus evaluating "NIntegrate[ f[x], {x, c1, c} ]" just gives the error the "Integrand ... is not numerical at...".
I've also tried "NIntegrate[ f[x], {x1, x, c}, {x2, x, c}, {x, c1...
I have a function f(x) which is defined as
f(x) = \int_{x}^{c} \int_{x}^{c} f(x_1,x_2) dx_1 dx_2
where c is a known constant and f(x1,x2) is a multivariate Gaussian. Unfortunetaly there is no closed form solution for f(x).
My problem is I want to numerically calculate
\int_{c_1}^{c} f(x)...
I need to estimate parameters from data that follow a mutinormal distribution. The parameters that I need to estimate are contained in the expression for the mean of the marginal normal distributions. That is each marginal distribution has mean:
\frac{p_1*c_i + p_1*y}{p_1+p_2}
where...
Are you sure the terms highlighted are correct?
Shouldn't it read:
Var[E[\sum_1^n X|n]] = Var[n\mu] = Var[n]\mu^2 ??
And therefore, as mathman has stated (var(sum)=sum(var)) does not hold when n is a random variable?
If I have a set of indepenent and identically distributed random variables X1,...Xn, then Var(\sum_{i=1}^{n}X_i) = \sum_{i=1}^{n}Var(X_i).
Now I want to know what the sum of variances of Xi would be when n is a random variable?
I'm guessing the above statement still holds when n is a random...