Mathematica Definition and 1000 Threads

Wolfram Mathematica is a software system with built-in libraries for several areas of technical computing that allow symbolic computation, manipulating matrices, plotting functions and various types of data, implementation of algorithms, creation of user interfaces, and interfacing with programs written in other programming languages. It was conceived by Stephen Wolfram and is developed by Wolfram Research of Champaign, Illinois. The Wolfram Language is the programming language used in Mathematica.

View More On Wikipedia.org
  1. S

    Mathematica Mathematica array plot won't plot and it erases all of my stored variables

    Hi, I wrote some code on a computer at school. dim = 50; Ediff = ConstantArray[0, {dim, dim}]; \[Lambda] = .5; steps = 10; Ediff = ConstantArray[0, {dim, dim}]; L = 1; For[xs = 1, xs <= dim, xs++, For[ys = 1, ys <= dim, ys++, Ediff[[xs, ys]] = Ediff[[xs, ys]] +...
  2. R

    Converting Standard For Loop to Mathematica Code for 2D Iteration?

    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...
  3. S

    Mathematica View open windows in Mathematica

    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.
  4. R

    MATLAB Mathematica to MATLAB translation

    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.
  5. A

    Mathematica How to Define a Complete Bell Polynomial in Mathematica?

    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...
  6. K

    Mathematica Mathematica - Analysis of a mass-damper-spring system

    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...
  7. S

    Mathematica Mathematica Looping Help: Find 'v' for 10 Different Values of 't

    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...
  8. C

    Mathematica How to label points in 3D Scatter Plot (Mathematica)

    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...
  9. E

    Fitting a function in mathematica

    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...
  10. ChristinaJ

    Mathematica Mathematica; NotebookEvaluate inside CreateDialog

    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...
  11. V

    Mathematica Mathematica: Listplot & Non linear fitting

    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...
  12. A

    Wavefunction DFT (Mathematica)

    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...
  13. F

    Mathematica: position vs time in a spring

    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...
  14. E

    Mathematica Can Mathematica Handle Complex Inverse Laplace Transforms with Bessel Functions?

    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...
  15. M

    Mathematica Vector Divergence in Mathematica

    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...
  16. D

    System of difference equations with Mathematica

    Hello all, I am attempting to characterize a molecular pathway through a system of difference equations: W[n + 1] = W[n] - b*L[n]*W[n] + nw H[n + 1] = (1 - dwl)*H[n] + b*W[n]*L[n] G[n + 1] = G[n] - g*H[n] + ng B[n + 1] = (1 - t)*B[n] - e*G[n] + nb T[n + 1] = (1 - dd)*T[n] + t*B[n] L[n +...
  17. N

    Mathematica Problem with NDSOLVE in Mathematica

    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...
  18. N

    Mathematica Integrating over the phase in Mathematica

    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 =...
  19. A

    Mathematica How Do You Count Opposite Sign Pairs in Mathematica?

    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...
  20. S

    How to Implement a Two-Parameter Asymptotic Expansion in Mathematica?

    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...
  21. N

    Mathematica How to define vector function in Mathematica

    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...
  22. ChristinaJ

    Mathematica Mathematica: Dialog button window to remain open after click

    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...
  23. C

    Mathematica How to Plot in Cylindrical Coordinates in Mathematica?

    I'm looking for a function to plot things in 3D using cylindrical coordinates but apparently Mathematica doesn't have one?
  24. I

    Mathematica Efficient sampling of function. [Mathematica]

    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...
  25. H

    Mathematica Mathematica: Parabolic Fit using Predefined Program and ErrorBarPlots Module

    I'm using a predefinied program... but I don't know because give me this error: Clear["Global`*"] Remove["Global`*"] << "ErrorBarPlots`" xdata = {180, 200, 220, 240, 260, 280, 300, 320, 340, 360} {180, 200, 220, 240, 260, 280, 300, 320, 340, 360} ax = First[xdata] 180...
  26. M

    Mathematica Mathematica: draw a double integral

    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 =...
  27. N

    Mathematica Mathematica: NIntegrate data points

    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...
  28. N

    Mathematica For loop in Mathematica doesn't work

    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?
  29. N

    Mathematica Solving Systems with Iteration in Mathematica

    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...
  30. MathematicalPhysicist

    Mathematica Letting mathematica compute taylor expansion of implicit function.

    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...
  31. W

    Mathematica Mathematica Calculating length from pixel count

    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...
  32. K

    Mathematica problem regarding plotting many functions in one graph

    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...
  33. M

    Mathematica How Do I Correctly Insert My Population Growth Model Syntax in Mathematica?

    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...
  34. D

    Worth it or not?: Bertrand Russell's Principia Mathematica

    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...
  35. A

    Mathematica Plot 2d image from 3D data Mathematica

    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...
  36. P

    Mathematica Solving a Mathematica Function of 2 Variables w/ Nestlist

    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.
  37. P

    Mathematica Iterative Function with Last 10 Values for Any Input Constant K

    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...
  38. Z

    Mathematica AlgebraicNumber to simple number in Mathematica

    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...
  39. N

    Mathematica Mathematica: NDSolve in 3 dimensions

    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] ==...
  40. J

    Mathematica Help in Mathematica code for solutions expansion of differential equations

    I need to NDsolve four differential equations. But I find my code does not work. Who can give me some suggestions? Thanks!
  41. P

    Mathematica Mathematica: Inertia Tensor w/ 3-d Rectangle

    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...
  42. C

    Mathematica Mathematica Limits: How to Evaluate Limits with 2 Variables Approaching 0

    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?
  43. E

    Mathematica Mathematica Assumptions for integration [pertaining to loop corrections]

    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...
  44. F

    Mathematica Mathematica newbie: why won't this integrate?

    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...
  45. N

    Mathematica Mathematica: Random numbers from arbitrary PDF

    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...
  46. A

    Volume-calculating function 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]...
  47. 6

    Mathematica Mathematica Pattern matching and replace repeated

    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...
  48. I

    Mathematica Animate & animated gif in Mathematica

    "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...
  49. A

    Mathematica Quick question about determinants in mathematica

    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...
  50. S

    Multiplying polynomials in Mathematica

    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.
Back
Top