Working with functions defined by "Interpolation" in Mathematica
Hello,
Just perhaps a simple question for a Mathematica expert:
I have a function of two variables f(a,b) defined using Interpolation option
in Mathematica. I am wondering how to determine the value of one of the
variable...
I'm having a problem with NDSolve. See attached picture. I have a package generating a set of ODE's, which I display, and then the next line is the NDSolve integration. I get an "Encountered non-numerical value for a derivative at t==0" error, and I can't spot the mistake. The one thing that...
Hello,
I am trying to solve the following problem using Mathematica:
I have (defined) a surface of two variables, say f(a,b). Now I want to
plot a path (a line) that corresponds to min[f(a,b)] starting from
certain valus of a and b (say a0,b0). In other words the path always proceeds...
I've been having some trouble modeling shot noise for a photomultiplier tube on Mathematica - I know that I have to use a random number generator and the Poisson distribution to do it, but I'm having trouble synthesizing everything. (There are many things I'm going to leave just as parameters...
Hi,
I use ParallelMap with Mathematica on Linux to solve 100 eigenvalue problems on 4 kernels. This operation ist repeated very often, and over the course of time the performance drops significantly. Using top, you can see that the CPU used by the master kernel increases, and the CPU used by...
I have no programming experience and trying to get mathematica to do what I need it to do is frustrating. I have the following functions that I need to iterate. For notational purposes, k[t+1] is the value of K in the next period. w is a parameter.
k[t+1] = -x[t] - y[t] + w
x[t+1] =...
Hi all,
I have a function defined by an integral containing an arbitrary real parameter q. I can't do the integral, so I wanted to plot the function by evaluating the integral numerically. However, I can't do this owing to the arbitary-non numerical parameter in my integrand! Can anyone tell...
I need to generate a set of random points on an unit sphere, using Mathematica. I can do it for a simple homogeneous (i.e. uniform) distribution of points using the following coordinates :
RandomPoints[u_, phi_] := {Sqrt[1 - u^2] Cos[phi], Sqrt[1 - u^2] Sin[phi], u},
with uniform random...
hi there,
I've a got a little problem here. I was trying to parametrically plot the hyperbola x=sec(t) y=tan(t) and mathematica always plots the asymptotes as well. Is there a way to hide these kind of asymptotes I know how to use the exclusions option to hide horizontal or maybe even...
Dear all,
Iam looking for a generic code that could express the following functions:
Subscript[mata, 1] = hl[[1]];
Subscript[mata, 2] = matg[[2]].hl[[1]] + hl[[2]];
Subscript[mata, 3] = matg[[3]].matg[[2]].hl[[1]]
+ matg[[3]].hl[[2]] + hl[[3]];
Subscript[mata, 4] =...
Does anybody knows the package that can, given metric and equation of hypersurface (spacelike or null )calculate induced metric, external curvature and expansion (Raychaudhuri equation) in Mathematica.
Thanks
Hi,
Does anybody know how I can let Mathematica show the origin point when plotting?
Usually, it labels the axes with numbers but not the origin. I have to use Tick{} to let it show origin. But who knows how I can have it show automatically?
Thank you.
Hello everyone.
Using ListLinePlot and ListAnimate I have made an animation with a hundred frames or so. Also, I have an animated graph corresponding to that animation, plotting certain values. For my presentation, I would like to show the audience these two animations and for that reason I...
Hello?
Has somebody used or has experience about using Mathematica's code with multi threading for increasing it's capacity and efficiency or smth like this?
My personal computer hasn't enough capacity to calculate all i need so now I'm looking for using Math on cluster.
Thanks!
[ANSWERED] Mathematica -> making multiple variables in one go?
Ok so let's say i know how many variables i want:
numberofvariables = 5;
and then i want to create 5 different variables, say X1, X2, X3, X4, X5 based on some formula, say:
Xi = 5+i^2
but i want this creation of...
I have a generalised eigenvalue problem of the form
A\boldsymbol{u} = \lambda B\boldsymbol{u}\;,
where A and B are symmetric matrices with real symbolic entries. I'm trying to compute the eigenvalues with Mathematica using the command
Eigenvalues[{A,B}]
which according to the documentation...
I need to define some "Tables" in Mathematica, in which some elements contains their own item number, like the following example below :
A := {a, b, 3 c, d}
B := {1, b, c, d}
C := {a, b, c, 4, d, e}
D := {a, 2, c, d, 5, g}
How can I do this ?
Hello friends;
The points in the source code is supposed to be drawn in 3-D,
S in source code means points in cartesian cordinate (X-Y-Z) respectively.
I am supposed to draw the points in 3-D graph.
Please friends, help me do this.
The source Code is below
a2 = 90; Rz1 =...
Hey, how can i get a non trivial solution from matrix equation Ax=0
more precisely, i want to calculate eigenvectors : (M- a_1*I)x = 0, i keep getting x=0.
Hi,
I would like to know if there is a command in Matlab or Mathematica or Maple, which shows the area of a closed curve.
For example, find the area enclosed by a circle, x^2+y^2=1.
I wish I could use a command like "SOME_AREA_COMMAND[x^2+y^2=1]" and it can give me the answer Pi.
I know I...
Dear all,
Please help me to get the right codes of sumu17[m,n] and sumv17[m,n] that should be kept inside the Do-Loop.
You can refer to the attached file to view the code.
I appreciate for any comments.
Thank you.
I was using Mathematica to find the limit of the equation:
(x^3*Floor[x - 3])/(x - 3)
As x approaches 3.
Mathematica gave the answer as 0, but when I checked by hand, I did not get that.
As the function approaches 3 from the left side, it goes to positive infinity. As the function approaches 3...
hello everyone!
I tried to work on MATHEMATICA and i find it so fine! But i have a problem! I can't save my notebooks. I get a message for a wrong path,but reading the whole message i assumed it's not smthing that i can fix. Did anyone have the same problem?
Thank you!
Dear Fellows
I am working on Mathematica and found my graph successfully but the problem only I am having is how to label my graph,
command of my plot is
Plot [Re[u], {x, 0, 1}, Frame -> True]
which shows the range of x-axis but I also want to define range of my y-axis ,,,
can...
Hi guys,
I have a long list of numbers which has only two values, e.g. {1,1,1,0,0,1,0,1,0,0,0...}.
The list is ordered as a function of time -- chronologically.
I need to see, then, how long the list stays at 1 before going to 0, and then how long the list stays at 0 before going back...
The integral is :
http://i038.radikal.ru/1108/ed/a6cd0c5e8f36.jpg
, where "y" - coordinate, "kx" - component of wave vector
if we calculate this integral on a paper with a pen and using compex variables theory we obtain:
1) y>0
here, in the capacity of contour we take...
Dear all,
I am just wondering why I did not get the right outputs from the Do-Loop iteration. When I run the Do-loop, I got the wrong results as compared to the results I obtained for an individual iteration.
For instance:
Case 1 with Do-Loop run from m = 1,3,5 and n = 1,3,5:
In[1]:=...
hello all! I just got a new computer with an Nvidia card, and am now able to do some GPU parallel processing inside mathematica using CUDA.
My main interest is in taking tons of moderate accuracy (3-4 digits) numerical integrals. I've been using QMC in MMA and that's been working well...
Please anyone can help me for finding solution of linear equation by using mathematica,
for example take us equations as,
9x+10y+7z+18 w=8
3x-3y-8z+88 w=0
12x+9y-17z-14w=2
x+y-2z+w=0
Infect I have to use this thing in my code which will be good by using this thing,,,
Any...
mathematica not supporting graphs,,,code is as
Dear Fellow I was trying to make graph using mathematica but because of imaginary appearing mathematica is not supporting don't now how to evaluate the graph,,where code for mathematica is as
rho = 1.74*10^(3);
lambda = 9.4*10^(11);
mue =...
Homework Statement
Obtain general solution:
x^2 y''(x)-2 x y'(x)+2 y(x) = x^2+2
Homework Equations
Using Euler Cauchy method, and using variation of parameters
The Attempt at a Solution
Hey all, I have been struggling with this problem since yesterday in obtaining the...
Dear all,
I have a problem with regard to the summation which is done inside the Do-Loop iteration. I have attached the file which includes further information about the defintions, some examples and etc.
Please help me to get the right codes in order to express totalu1, totalv1, totalu2 and...
In Mathematica 7, I entered
u = {1, 2, 3, 5, 7, 8, 10, 11}; v = {1, 2, 4, 5, 4, 3, 1, 1}; w =
Transpose[{u, v}]; ListPlot[w, PlotRange -> All,
AspectRatio -> 1/1]
I wanted this to display a dot at each of the 8 points of w,
{{1, 1}, {2, 2}, {3, 4}, {5, 5}, {7, 4}, {8, 3}, {10, 1}...
Hello,
I have a sequence of polynomials defined in the following way:
P_k(x) = \frac{\partial^k}{\partial x^k}e^{s(x)}\vert_{x=0}
Essentially the polynomial Pk is the k-th derivative of \exp(s(x)) evaluated at x=0. The function s(x) is a polynomial of 2nd degree in x.
In mathematica I...
Hi,
I was thinking if there is a way to combine 2D and 3D plots in mathematica. I mean, for example I have a curve on the XY plane and I want to combine it with a graph of a surface, so to have that curve under the surface. The other case , to combine a 2D vector field with a surface ...
Hi and thank you for reading this.
I'm learning to use mathematica and among those things I'm trying to do, is to define a function that can count for me, say, the number of positive zeros less than a given number Z of a familly of function.
For exemple, let f_n(x) = sin(x/n) for any...
Hi guys!
I'm trying to the value of x when a function F[x] has a certain expression. I'm computing the value of F[x] using NDSolve and a set of differential equations - all numerically. Yet, I can't find an easy and systematic way to find the value of x when F[x]=constant.
I tried using...
Hi Everybody,
So basically I spent the summer working on some optics related stuff and now they want me to present my research work. This means I'm going to have to do numerical simulations for diffraction of Laguerre-Gaussian beam modes. In a word, the integrals are ridiculously long and...
How do I plot those together?
It seems like Mathematica isn't recognizing Primorial. Every time I try to use it, it just prints it back for output.
For example:
In[30]:=
Primorial[2]
Out[30]= Primorial[2]
I am trying to model a simple birth and death process in Mathematica using the Gillespie Algorithm.
I am using 1 DNA molecule that is transcribed to mRNA with rate k1,
\mbox{DNA} \longrightarrow \mbox{DNA + RNA}
and the transcribed RNA are subject to degradation with rate k2...
How do you plot arbitrary constants in mathematica? for example r(psi)=a(1-eCos(psi)), where a and e are some constant.
Thanks in advance for the help.
hi
i want to solve this equation
a/x=Cosh[b/x]
i set a=1 and b=5
and use NSolve code but mathematica say it can not solve it. but with maple i get real and imaginary parts.
1-is there another method to solve this equation numerically?
2-can this equation be solve for arbitrary a and b...
Dear all,
I have a problem with my code using the substitution. The code works perfectly without substitution however it does not work with substitution. I mean, I got the results of sub[1], sub[2] and sub[3].
But using the code replacement, I got sub[1] = sub[2] = sub[3], which are not...
I have a nested list of the type:
{{1, 2, 3}, {1, 2, 4}, {1, 1, 2}}
I want to find the number of sublists in which the first two elements are equal, so in this case that's one (the sublist {1, 1, 2}).
Is this possible in Mathematica?
FromDigits /@ Permutations[Range[9], {4}]
MapThread[Power, Transpose [FactorInteger[1234]]]
MapThread[Power, Transpose [FactorInteger[#]]] &[FromDigits /@ Permutations[Range[9], {4}]]
Expression 1 and 2 work, so why not 3?
General goal:
Find the factors of all permutations of the digits 1-9...
Hello,
I'm trying to (numerically) solve the equation y''*y=-0.5*y'^2 in Mathematica.
I know there's an analytic solution (and I know how to calculate it), but I want to modify this equation and thus need to verify that the numerical solution for the original equation is exact.
I'm using...