here is the pseudo java (processing) code I'm trying to run
float x0,y0,x,y,t;
x0 = 2; //arbitrary value
y0 = 5; //arbitrary value
x = x0;
y = y0;
for(int t = 1; t <= 100; t++){ //one hundred iterations
t =atan2(y,x);
x += cos(t);
y += sin(t);
print( x...
Is there a way to bring up all of the notebook you're currently working with in Mathematica? Sometimes, a notebook I'm using disappears and I can't call it back up.
Hi, I have some Mathematica code I want to translate in Matlab, does anyone know how to translate the Table [expr,{i,a,b}]to Matlab? I made one with a loop, but loops are very slow and I am going to analyze large datasets with the functions.
Hello,
how do you define a function or make a list with n elements, where n is any? More precisely there is a function in mathematica, BellY
BellY[n,k,\{x_{1},...x_{n-k+1}\}]
which gives the partial Bell polynomial. I would like to define in mathematica the complete Bell polynomial defined...
Hello,
I am currently working on a problem, but at the moment I am stuck. I just don't know how to solve the problem so I hope someone can help me with it. This is the question
1a : Consider the standard mass-damper-spring system:
m y''+γ y'+k y=u
where the constants have the following...
pl help
Here I have written a mathematica code. It is a small example of my actual problem. In this code, 't' is an arbitrary constant which is being fixed at the top of the programme by assigning a value. All the other variables 'a','b','c' depend upon 't' . and 'h1','h2' are the roots of...
Hi, I really need some help here.
Right now I am plotting points on a 3D Scatter plot chart in Mathematica. I want to assign each of these points with a value which will be the label. Basically each point has 4 variable in the parameter. Its x,y,z cartesian coordinate position and the last...
Say I have a function:
f(x,y)
I have values for f and y such that I can make a plot of f vs y... however, from the values of f and y, I am interested in finding what x is. The x value should be a constant that is optimized to fit the f vs y graph.
Is there a way I can do this in...
The following creates a button window to select a notebook to run. When a button is pressed Mathematica finds the notebook but cannot evaluate it. The following error occurs
Could not process unknown packet "1"
CreateDialog[
DialogNotebook[{Column[{TextCell[
Row[{Style["I would like...
Good day,
I am relatively new to mathematica, and I am using it to fit a formula to a dataset that I have. To begin with, I am having issues with a very simple part, namely with a ListPlot.
I have an xls file with 2 columns and 26 rows, corresponding to an x and a y value. Using import, I...
This question is not directly related to QM although my reason for asking it is I'm trying to compute wavefunctions on my PC -- please excuse me if this is the wrong place to ask. I am having trouble using the DFT in Mathematica although I don't think my problem is directly Mathematica related...
Homework Statement
Plot the position vs time graph of an object attached to a spring.
m = 0.5 kg
k = 60 N/m
x[0] = 3 m
v[0] = 4 m/s
Homework Equations
d²x/dt² + (k/m)*x = 0
The Attempt at a Solution
I solved the differential equation using DSolve and plotted the resulting...
Hello,
I have the following Laplace function:
\frac{\left[2\sqrt{a\,s}K_1\left(2\sqrt{a\,s}\right)\right]^N}{s}
where N and a are constants and K1 is the modified Bessel function of the second kind and order 1. I need to find the inverse Laplace transform at a specific value. Can I do...
I'm trying to make a little manipulate/interactive box that shows the vector divergence of the E-field coming from a sphere. I have no idea how to start as I'm really new to Mathematica. Does anyone have any pointers? I can't find anything particularly helpful on the Wolfram reference or...
Mathematica says:
"NDSolve::alliv: "The function x[t] was specified without dependence on all the independent variables. Each function must depend on all the independent variables.""
But function x depends only on t, there is no other variable specified in the code.
What could be the...
Hi,
I have a question about integrating over the phase of a function in Mathematica. The origins of this problem is in scale analysis.
f(x,t)= \sum_n a_n \cos (n(kx-\omega t))
for k,\omega \in \mathbb{R}. I want to integrate an expression dependent on f over the phase
\theta_n =...
So I want to be able to count the number of neighbour pairs of opposite sign in a list of 1's and -1's (eg. 1 for {1,1,1,-1,-1} and 3 for {1,-1,1,-1,-1}), but I can't work out the pattern matching syntax in Mathematica even after reading the documentation. I was thinking to use the Count...
Homework Statement
How do I implement the series k(tilde) = k0 + \sum_{i,j} ki,j \epsilon1i \epsilon2j into Mathematica.
This is a 2 parameter asymptotic expansion and I am plugging this into my equation I am trying to solve.
Also I don't know how to implement the O[\epsilon1} and...
How you define vector function in Mathematica?
For example, f is a vector function and f=(xy,yz,zx). How to define this in Mathematica and then how to calculate the value of the components of f for any number x, y, and z?
For scalar functions it goes as this:
f[x_]:=x^2
f[4]
Any...
All,
I have a button panel (code below) where a pressed button initiates a particular Mathematica script.
When the button is pressed the script runs (as it should) but the panel closes. I wish for the panel to remain open so that I can click another button. The panel should close only when...
Hey there PF.
I wanted to ask here if someone had any input as to why a tiny part of my code is "slow".
I have sloved a somewhat big eq.system numerically with Mathematica. Now, I do not really need the
actual integrated functions and so I sample them.
Below: I sample (picks out only 4...
I've written a MATLAB m-file to draw a double integral as below.My problem is how to draw a double integral when the variables are located in the bounds of the integral not under its operator!
m-file:
tetha = pi/4;
lamb = -1;
h = 4;
tetha0 = 0;
syms x y l
n =...
Hi
I have a set of data points in units of (time, voltage), and they have the form of a Gaussian when I plot it. I would like to normalize my data set, i.e. find a factor C that I multiply on to the voltage-data such that the area is 1.
However, is there a way to numerically integrate data...
I have problem with for loop in Mathematica given in the notebook attached.
It evaluates only first step and then shows problems and the kernel could not stop running.
What could be the problem? What is the correct syntax?
What I want to do with Mathematica is this:
1. Given are 4×1 matrices e and u, and 4×4 matrix V. Matrices e and V are constant.
2. Solve the system u=V.f for f, where f is 4×1 matrix.
3. Define 4×1 vector g such as g1=f1*Exp(e1*t), g2=f2*Exp(e2*t) etc, where g1 is the first component of g, f1...
I have the next function: z^3-2xz+y=0 and I want to find taylor expansion of z(x,y) at the point (1,1,1), obviously I need to define F(x,y,z) as above and use the implicit function theorem to calculate the derivatives of z(x,y), but I want mathematica to compute this to me.
I tried the Series...
Hello. Does anyone know of a fast way of converting pixel count into a length metric (preferably using Mathematica)? I have an imaging program that segments and measures the lengths of objects in an image, but the only parameter that I can extract is pixel count, which then can get converted to...
hey guys i have a problem regarding plotting several graphs in one plot via mathematica. I want this plot's x-axis to be in a log scale so i used loglinear command.
here the plot is b[a] vs. a.
w[a] is part of my differential equation and it depends upon a and c.
i have written the program...
Hey everyone,
I am struggling to properly insert my simple model syntax in mathematica for a population growth.
The formula is as following:
Rate of growth over time = birth rate*N - death rate*N + net migration rate*N
I have been trying to add saturation to the model for the population N...
Worth it or not?: Bertrand Russell's "Principia Mathematica"
Evening,
As a physics undergrad, I feel that my understanding of mathematics is lacking – not in terms of how to do something, but in terms of why you'd do something. For example, why take the integral of Schrödinger's Equation...
hello guys,
I have a CSV file with hyuge set of data devided into 3 cols. Y position X position and corresponding intensity values.
I want to plot the image , my thesis is laser- microscopy. so a 2D plot ( density plot ) based on these values.
The following is what I have tried so...
I have a function of two variables
f[x_][y_]=x^2+y;
d=Take[NestList[f[-2],0,10],-2];
now i want to repeat this process by changing -2 to -1.99, then -1.98 all the way up to 0
and storing values in a table, so i can later make a plot. I can't figure out how to repeat this process.
say I have a function f(x)=x^7+k
I want to iterate x(n+1)=f(xn), 50 times
starting with x0=1
and keep the last 10 values
i want to assigh these values to some function''y'' and be able to use y to calculate this iteration for any input constant K. ie say K=0, K=0.5 etc, and then i want to store...
Hello,
From some matrix operations I get "AlgebraicNumber[-4 I, {0, -(1/16)}]" as output.
I need to get i/4 and I don't know how. If I write "N[AlgebraicNumber[-4 I, {0, -(1/16)}]]",
I get 0. + 0.25 i but it is not what I want neither. I would like to get just i/4 as output.
Can...
Hi
I am trying to solve Newtons equation for a particle in (x, y, z) using NDsolve. Here I what I have so far:
sol = NDSolve[{
x''[t] == acceleration[x'[t], y[t], z[t]],
y''[t] == acceleration[y'[t], x[t], z[t]],
z''[t] == 0,
x[0] == 2, x'[0] == 0, y[0] == 0, y'[0] ==...
Hey All,
I'm trying to create a 3-D rectangle in Mathematica with the following measurements: Mass M=1.5 kg, and sides of length a=10 cm (parallel to the x-axis), 2a (parallel to the y-axis), and 3a (parallel to the z-axis). Let one corner be at the origin, and let the three adjacent edges...
Can MMA take limits as 2 variables approach a value?
I want to take the limit as h and k both approach 0 for f(x+h,y+k)-...
Is there some trick to doing this?
Long story short I have an integral which is something like this:
(in Mathematica code)
Integrate[1/{(1 - b^2)*{((1 - y)*z + y)^2 + (1 - y)^2*(1 - z)^2} + 2*(b^2 + 1)*{(1 - y)*(1 - z)*((1 - y)*z + y)}}, {y, 0, 1} ]
Written without assumptions.
b is actually only in [0,1] and I think I...
EDIT: I solved it. Sorry for waste of time! :(
Here is the function ψ[x]:
0.0000551056 a0.25 (30240. a0.5 x - 80640. a1.5 x3 +
48384. a2.5 x5 - 9216. a3.5 x7 + 512. a4.5 x9)(-((a x2)/2))
I am trying to integrate ψ[x]*ψ[x] over all space (-infinity to +infinity).
I don't get any error...
Hi
I want to generate a set of random numbers according to a specific distribution, namely given by
f(v) \propto v^3\exp(-v^2 C)
where C is a constant. It is clear how to do it with a distribution already implemented in Mathematica...
Homework Statement
Create a function MyContainer[R, L, l, H] in the program 'Mathematica' to determine the capacity of fluid in the container according to the given filling height H. The container is a cyclinder with cones on both sides.
The arguments of the function MyContainer[R, L, l, H]...
I decided to ask here as well, because maybe someone will see it. Given a list of integers, use pattern matching and //.to create a rule that generates an ordered list of integers that are larger than the previous numbers in the list, eg given {3,5,2,0,6,1,8,4,9}, you should get {3,5,6,8,9}.I...
"Animate" & animated gif in Mathematica
Hi to all. This period i am working on a project. I want to demonstrate the motion of a vector in 3D animation.
I have a txt file with 4 columns and 8010 lines data. The first column is the time and the three other are the components of the vector in 3D...
Sup guys,
So, I'm totally new to mathematica. I need to use it in order to compute a determinant of a
4x4 matrix that is made up entirely of functions. I almost managed to do this in wolfram alpha, but for a 4x4 matrix, the input is too long. Do you guys know how to do this (and if it even...
I have two polynomials
(1+x+x^2+x^3) and (1+x+x^2+x^3+x^4), I'm trying to figure out how to compute the product in Mathematica, but it's not working.
Any help is appreciated, thanks.