Mathematica Definition and 1000 Threads

  1. Y

    Mathematica Problem in NDSolve in mathematica

    i want to solve a large system of coupled differential equations but i get this error NDSolve::nlnum: i attach the notebook in zip format. what is the problem? thanks
  2. H

    Mathematica How to Order (x,y) Coordinates in Mathematica?

    Hi everyone, Is it possible to order a list of (x,y) coordinates in Mathematica by x, then y? I currently have a number of data files in which there are 5 columns: x, y, area, circularity, radius. I would like to order the list by x and y coordinates while keeping the rows intact. Thank you
  3. Y

    Mathematica Integro-Differential Equation with mathematica

    hi how can i solve a system of Integro-Differential Equations in mathematica numerically or analytically? thanks
  4. MathematicalPhysicist

    Mathematica can answer also philosophical questions.

    In the pic, I wonder what Mathematica can't do. :-)
  5. N

    Mathematica Mathematica takes long time to solve integration

    Hello, I have this equation as attached, I need to integrate with respect to 'phix' from 0 to ∏/2. I have been waiting for the solution for one hour. Does it not have closed-form? Could someone please point the problem. Thank you so much.
  6. O

    Mathematica Defining a Case Function in Mathematica: A Convenient Solution?

    Does anyone familiar with a convenient way in Mathematica to define a case function such as: y(x)=\left\{\begin{array}{c} x \\ -x\end{array}\begin{array}{c} x>0 \\ x<0\end{array} \right. ? Thankes, Omri
  7. T

    Mathematica Mathematica setting variable to be real number

    Hi All, I am trying to solve a set of coupled non-linear algebraic equations. I'm doing this using the LinearSolve fcn of mathematica and an implementation of the Newton-Raphson method. One of the issues I'm having is that I need to tell mathematica that one of these variables,let's say x...
  8. S

    Mathematica Plotting Binocular Disparity in Mathematica - Solve for f & d

    I calculated a binocular disparity \delta of two points, see also this topic, and got the following formula: \delta = Arctan(\frac{f}{D + d}) - Arctan(\frac{e}{D}) - Arctan(\frac{a - e}{D}) + Arctan(\frac{a - f}{D + d}) The assignment now says: Choose a = 6.5 cm, D = 40 cm and e = 3.25 cm...
  9. S

    Mathematica Help with Mathematica - Solve & Plot Equation

    Hi all, I'm just a beginner with mathematica, and I tried to plot the solution of the following equation \frac{d}{dx} (x^2 \frac{d y}{dx})=x^2 e^{-y} with boundary conditions y(0)=0, y'(0)=0 Using the following mathematica code: NDSolve[{D[x^2 y'[x], x] == x^2 Exp[-y[x]]...
  10. T

    Mathematica Mathematica Help Needed: Error Message With "For" Loop

    Hey all, I'm very new to Mathematica, so I'm looking for some help here. I'm writing an elementary program using a "For" loop, and getting this error message: "Sum::write: Tag Plus in i-1 is Protected. >>" Any ideas what might be wrong? Thanks!
  11. S

    Mathematica Creating your own function Determinant in Mathematica

    Hi guys. So I got this assignment, where I have to create my own function, which can calculate the determinant of any n x n matrix. The general formula we've been given is (recursive formula): det(A) = Sum[n,i=1] (-1)^{1+i} * a_{1 i} * det(A_{1 i}) where n is the length of the matrix...
  12. A

    Mathematica Take a matrix square root in Mathematica

    How in the world do you take the square root of a matrix in Mathematica? All the ways I've tried haven't worked... Thanks!
  13. A

    Mathematica Mathematica NDSolve Running Infinitely

    I'm trying to use Mathematica to solve a system of equations based on coordinate transformations and Lagrangian mechanics. The code follows here. However, when the system of equations is run, Mathematica never reaches an answer nor does it give an error, it simply runs infinitely. This is for a...
  14. C

    Mathematica How Can I Solve Complex PDEs Using Mathematica's NDSolve?

    I have a pde set as following: parameters: γ, ω, α, β, c, η variables: z,t; x,y want: S = S(z,t;x,y) A = A(z,t) ∂S/∂t = -γ*S - i ω*A*exp{-i*[(-θ-α*t)*x+β*t*y]} [∂/∂t + (1/c)*∂/∂t] A = -i η*∫∫dxdy S*exp{i*[(-θ-α*t)*x+β*t*y]} The integral range is angle:(0,2Pi), radius: (0,R) How to...
  15. J

    Mathematica [Mathematica] Sorting polynomial terms

    Hi. Can someone explain to me how to sort a Series so that the terms are in increasing powers of the exponent? For example the code: myseries = Normal[ Series[Sqrt[1 - w], {w, 0, 5}]] /. w -> 1/z produces 1-\frac{7}{256 z^5}-\frac{5}{128 z^4}-\frac{1}{16 z^3}-\frac{1}{8 z^2}-\frac{1}{2...
  16. K

    Mathematica Mathematica: Optimizing NIntegrate with complex integrand

    Hi, first of all I am new to Mathematica.(Mathematica v8.0.0) The Problem: I have been having some issues with one particular integral lately: I need to perform InverseFourier over a region of certain frequency and set the result as a function of time for later use...
  17. Y

    Mathematica How to define local variables and constants in mathematica

    hi suppose i run Two notebook and in each of them i have matrix A and Constant B and a function C in each notebook these things have the same name. if in notebook 1 i assign B=10 then in notebook 2 B is 10 too , which is not my desire. how can i define these constants and matrices and...
  18. L

    Fourier Series Expansion using Mathematica

    Hello, I recently learned about the Fourier Series and how it can be used decompose a periodic signal into a sum of sinusoids. I can calculate all the coefficients by hand, but I wanted Mathematica to do that for me. I attempted to write a code, and it does give the desired output. I...
  19. G

    Mathematica Mathematica: Trouble with defining function from gradiant

    Hi everyone. I've been using basically a whole day on two trivial Mathematica issues, so I'm finally going online for help: 1. Is there any simple way to define the gradient as a new function as such? My try: Clear["Global`*"] f[u_] := x[u]*y[u] gradf[u_] := D[f[u], {{x[u], y[u]}}]...
  20. F

    Mathematica Mathematica: Differential equations for double pendulum

    Hello Im new here, I hope I'm not disturbing anyone. Following this guide below, I am trying to find two 2. order differential equations, one for q1'' and one for q2'', describing the movement of the double pendulum. I have no problems with the mathematics, but when the guide tells me to...
  21. M

    Solving Second Order nonlinear-ODE with mathematica

    Hi, I am trying to solve a second order nonlinear eqn which is y''+3y'=1/(y^5), y'(0)=0, using mathematica. When I type DSolve[y''[x]+3*y'[x]=(1/(y[x])^5) ,y'[0]==0,y[x],x]; I get "second-order nonlinear ordinary differential equation" as a result. I don't understand what mistake I am making...
  22. R

    Mathematica Mathematica: Extracting pairs of points from a matrix

    Probably a basic Mathematica question but after trying a few things I'm stumped. I have a table with some x values and a range of data that are dependent on those values, call them a(x), b(x), c(x), etc. So the table looks like { {x1, a1, b1, c1}, {x2, a2, b2, c2}, {x3, a3, b3, c3}, etc. }...
  23. Y

    Mathematica Running simultaneous computation in mathematica

    hi when i run a heavy computation on mathematica in the same time even if i want to calculate 2+2 , mathematica does not calculate it until calculating of heavy computation finishes. why? another problem is that when i do a heavy computation and obtain results , after closing mathematica...
  24. R

    How to plot it graph in Mathematica

    The potential inside of a uniformly charged sphere of radius R is given by \frac{Q}{4\pi \epsilon _{0}}\frac{1}{2R}(3-\frac{r^2}{R^2}). Please help me on how to plot this equation in Mathematica
  25. T

    Mathematica Mathematica setting double vs. float

    Hi, I'm quite new to Mathematica, and I've been trying to use it to solve some PDE's numerically, and I eventually end up with a really large matrix I have to find the solution for. I was think the calculation would go by faster if I could take the precision of the numbers down. I think...
  26. L

    Mathematica How Can I Extract Data from Mathematica's NDSolve Output for Use in Gnuplot?

    Hi, I solved a differential equation using Mathematica using NDsolve, I get some solution, but I only know how to plot it in Mathematica. The problem is that I need the data - numbers - and I want to work with then a finally make the graph using gnuplot. Is there any way how can I cat...
  27. A

    Mathematica Mastering While Loops in Mathematica for Newton's Method Calculations

    I am trying to do some Newton's method-type stuff in Mathematica. I want to build a While loop that does the following: - Take input r. - Compute some quantity f(r). - Update the value of r to f(r). - Repeat until |g(r)| < C for some fixed constant C. The third (boldfaced) step is...
  28. L

    Mathematica Mathematica output seems incorrect

    I am using Mathematica to create a formula to solve for (Vs) in an equation shown at the top of the attached image. Using the assumptions shown, Mathematica outputs three possible solutions, all of which appear to be incorrect when I check them using actual values. I get this error when...
  29. P

    Mathematica Mathematica differential equation

    On mathematica: Solve the differential equation d^2 x(t)/dt^2 + x(t)(x^2(t) − 1) + t = 0 numerically, subject to the initial conditions that x(0) = 1 and dx(0)/dt = 0. Use Plot to plot the solution for the domain t 2 [0, 10]. 2. Above is what I'm trying to do. Below is what I've...
  30. R

    Mathematica Mathematica: Integrating over data sets?

    I've got a Mathematica question which might be quite basic, but I couldn't find much about it in the documentation (possibly because it's so basic) so please bear with me! I have a set of data, call it xi(ρ), which I want to integrate over some distribution function (log-normal in this case)...
  31. P

    Mathematica Mathematica beginner question: Function nesting

    Hello, I'm quite new to Mathematica and stuck at a point, where I have searched for hours to find a solution, but there seems no way out. Let's say we have two functions, f1[x_,y_]=x+y f2[x_,y_]=x*y How can a build a function f3, which is e.g. the sum of the other functions f1 and f2...
  32. U

    Mathematica How to substitute variables in Mathematica?

    Hi dear All Sorry for a stupid question, but I am really newbe in M. I have some function, for example D[y[r],r]. Now I want to substitute y[r] to Sin[r] and to ask Mathematicato make all the calculations. (i.e I want to get Cos[x]) If I make smth like D[y[r],r]/.y[r]->Sin[r] or D[y[r], r]...
  33. F

    Mathematica Mathematica: Plot a vector NOT against the component number

    Hi, I wish to listplot a list object against a scale that is NOT the component number of the vector, but is actually a well defined function of the component number, and I am lost how to do this? changing "Ticks" didn't help, or I did it wrong, so I am wondering if anyone knows how to do this...
  34. G

    Mathematica [Mathematica] Newbie with Compile[]

    Hello all :) I'm just beginning trying to use compiled version of several simple functions. And right at the beginning, I stumble onto a “Numerical error” error message which puzzle me… Here is my simple code : 11/18/11 12:51:07 In[18]:= \[Epsilon]IntrinsicSiliciumC =...
  35. Y

    Mathematica Problem with superscript and subscript in mathematica

    hi i want to sum over two indices i and j . the elemet that i must sum is (x^(i,j))-i that is x has superscript i,j and subscript i. but in mathematica it gives me error. here is the notebook : http://www.mediafire.com/?novtz7t0liu9u78 thanks (:
  36. S

    Plot with polynomial degree of 14 in Mathematica

    Homework Statement I have list( Depth vs. Deflection) of data which requires plotting with the polynomial degree of 14. Homework Equations I need help to figure out how to plot with polynomial degree. The Attempt at a Solution
  37. L

    Controlling Mathematica Through the MS-DOS Command Line in VBA for CST MWS

    Hi, guys. I need to control Mathematica through the MS-DOS command line in Visual Basic for Applications as part of a macro for CST Microwave Studio. I can call Mathematica through the command line just fine with Shell("math", vbNormalFocus) but when I try to enter commands afterward...
  38. Telemachus

    Mathematica Origin fit plotted on mathematica

    Hi there. I have a problem with this. I'm trying to plot a polynomial fit done with origin 8.5 on mathematica. The thing is that the polynomial plot I get in mathematica from the coefficients given in originlab don't match, and I don't know why. I'll let you some pics of what I'm trying to do...
  39. U

    Mathematica T[Index] in Mathematica: Get Element with Variable Index

    Hi. In Mathematica I have tensor T for example In[]:=Dimensions[T] Out[]:={3,3,4} now i have index of some element in the List form index={1,2,3} Now I want to use the element whose index is in variable index. How can I do it?
  40. Y

    Mathematica How to Plot x[t] Versus y[t] in Mathematica?

    hi i solve numerically two coupled equation and obtain two function x[t] and y[t]. how i plot x[t] versus y[t] so that horizontal axis to be x[t] and vertical axis to be y[t]. here is the notebook of mathematica http://www.mediafire.com/?g4sa3zi630vi8nl thanks
  41. C

    Mathematica Using Collect in functions, Mathematica

    Hello!: I want to know if it's possible to use the Collect command in a function. For example, I have this code: Subscript[E, 1] = \!\( \*SubscriptBox[\(\[PartialD]\), SubscriptBox[\(\[Omega]\), \(1\)]] \*SubscriptBox[\(\[Pi]\), \(m1\)]\); Subscript[E, 2] = \!\(...
  42. C

    Mathematica Mathematica: NDSolve with InterpolatingFunction as initial conditions

    The questions arises because I want to use the solution of one PDE as initial condition to solve another. Then using NDSolve, the first solution is given by InterpolatingFunction. I tried, it takes the whole afternoon, almost kills my computer but still not giving any result. Another computer...
  43. G

    Mathematica Dealing with a Discontinuous ArcTan[] Function in Mathematica

    Hello everyone, I copy-paste here a little bit of code: In[4417]:= x = (1.5` + 0.` I); y = (0.` + 0.` I); (* 1 *) ArcTan[x, y] (* 2 *) ArcTan[x // Chop, y // Chop] (* 3 *) -I Log[(x + I y)/Sqrt[x^2 + y^2]] {y == 0, Re[y] == 0, Im[y] == 0, Im[x] == 0} Out[4419]= -1.5708 + 0. I...
  44. A

    Mathematica Defining one matrix in terms of another in Mathematica with FOR loop

    THIS ISN'T WORKING AT ALL! I'm trying to define a matrix M in terms of a predefined matrix N by using the following for loop: For[a=1,a<=12,a++,M[[a,a]]=N[[1,a]]] So I just want the diagonal of M to be the first row of N. But this is not working at ALL. Does anyone see what I'm doing wrong?
  45. K

    Mathematica Mathematica: looping using Module

    Dear all, I have difficulty to solve this code which involves looping, In [1] := m = 1; n = 1 ; A = -1 ; B = 5 ; In [2] := m = 1; n = 3 ; A = 8 ; B = -2 ; In [3] := m = 1; n = 5 ; A = 9 ; B = 7 ; In [4] := m = 3; n = 1 ; A = -2 ; B = 8 ; In [5] := m = 3; n = 3 ; A = 4 ; B = 3 ; In...
  46. C

    Mathematica Why Does NDSolve in Mathematica Only Work with Machine Real Code?

    I am solving a PDE using NDSolve. It always give a message like: "For the method`IDA, only machine real code is available. Unable to continue with complex values or beyond floating-point exceptions." What does this mean? My code is as following. NDSolve[{∂t S[z, t] == -I z S[z,t] -I...
  47. I

    Solve Non-Linear DEs w/ Many Consts Using Mathematica

    How can a system of non-linear differential equations be solved using Mathematica? More specifically, I understand the process that needs to be executed, but I don't understand how to make it work syntactically. The process as I understand it: Four expressions are given in four...
  48. J

    Help in Mathematica code for solutions expansion of differential equations

    About serval differential equations where A, B, D, g, \chi, c are functions of r \begin{eqnarray} &-\frac{{\chi}'}{r}+\frac{c'}{c}\left(\frac{g'}{g} -{\chi}'\right)=\frac{e^{\chi}(q A B)^2}{r^2 g^2 c^2}& \\ &c c''+c c'\left(\frac{g'}{g}+\frac{2}{r} -\frac{{\chi}'}{2} \right)=-\frac{B'^2}{2...
  49. M

    Mathematica Mathematica Animate function question

    Hi Im doing a 2 dimensional heat spreading simulation. I've created a matrix with 3 indices with the first index being for time step and the two other for element coordinates. height = 20; width = 4; a = 0.5; J = Round[height/a]; L = Round[width/a]; h = 0.1; roomT = 20; T = 90...
  50. H

    Mathematica Solve Quick Mathematica Issue with HypothesisTesting

    Greetings, I have a nagging issue that keeps annoying me in Mathematica. If a Mathematica function outputs a number I want in the form "variable→number", is there a function I could use or something simple I could type to get the number itself, rather than in the Root[variable, number]...
Back
Top