Mathematica Definition and 1000 Threads

  1. Hepth

    Mathematica Do the integrals in Mathematica depend on the FeynCalc package and its options?

    How is MM doing the integral? Is this something with a definite solution? Limit[Integrate[(1 - 2 x)/x^2, {x, a, b}], a -> 0] Integrate[(1 - 2 x)/x^2, {x, 0, b}] The first one gives infinity, the second a closed solution, though technically they should be the same, right?
  2. S

    Mathematica Can I Create a Pattern with Alternating 1's and 0's in Mathematica?

    I am using co = 0; co++ If[Mod[co, 20, 1] > 10, 1, 0]; which is used in an iterative function which produces 10 1' s 10 0' s, 10 1' s 10 0' s and so on ... Could I use a similar method to produce 10 1' s then 5 0' s, 10 1's 5 0' s and so on...
  3. M

    Mathematica How Can I Plot Energy Level Occupation Numbers in Mathematica?

    So, I've managed to get the distribution in a decent way. Using this code; hw = 1; kt = 25; n = 10000; dist[b_] := 1/(b*Exp[hw*m/kt] - 1); normsum[b_] := Sum[dist[b]*(m + 2)*(m + 1)/2, {m, 0, 300}] q = FindRoot[normsum[b] == n, {b, 0.5}] occnumber = Table[N[dist[b /. q]*(m + 2)*(m +...
  4. F

    Mathematica Mathematica Beginner question: Nested loops

    Hello, I'm quite new to Wolfram Mathematica and do like the elegance of some parts of the language. However, I think that loop controls are quite different and not very intuitive. Here is a simplified version of what I'm trying to do (now of course done manually): k[1] = {200, 300, 400...
  5. S

    How Can I Determine Stability from Mathematica's Root Function Output?

    I'm kinda of messing around with a model of a biological system, I've found the equilibriums and decided I'd get the stability relations as well. I tried using mathematica to get the eigenvalues of the system to see if its stable or not and when I got the eigenvalues of my matrix mathematica...
  6. D

    Mathematica Mathematica Input Equations of Motion

    I am trying to input these 2 equations of motion for a double acting pendulum into mathematica in hopes of solving for θ2, θ2', and θ2''. I am fairly new to the program and I am having trouble inputting the equations. I am swinging a prosthetic leg like a pendulum and I am trying to predict what...
  7. A

    How to Superimpose Multiple Plots in Mathematica?

    Hi everyone, i have been recently trying to get familiar with the Mathematica software for a project am working on. In the course of that i encountered a problem on graphics. here's the question: Superimpose the plots y=√(x^2+a), √a≤x≤√a+3 for the values a=1,a=4,a=9 in the same figure...
  8. B

    Mathematica How Can I Generate and Plot Multiple Y Sets in Mathematica?

    Suppose that I had a set of Y points Y = {y1,y2,...yN} and I want to plot them again a set X = {1,2,3,...,N} Naturally, I would like to do something like: YX = { {y1, 1} , {y2,2} , ... , {yN,N} } followed by ListPlot[YX,PlotJoined->True] My question is: How can I construct YX...
  9. R

    Mathematica Mathematica: Plot using abstract variables instead of set values

    Hi All, Does anyone know of a way to make plots in mathematica in terms of variables? For example, suppose you had a function sin(a*x), and you wanted to plot it but did not want to set a to a specific value, the purpose being to have the graph report multiples of a, not specific numbers...
  10. D

    Mathematica How to get a plot from Mathematica to Latex (in laymens)

    OK. Could somebody please tell me how to get a graph/plot from Mathematica into WinEdit. I've seached on the internet and it all talks about source codes and a lot of other stuff I don't understand. Copy and paste does not seem to be an option! Could some one exlpain to how to do it...
  11. I

    Mathematica Effortlessly Display a Matrix of Numbers in Mathematica | Quick Solution

    Hello, does anyone have an idea how easily to display a matrix of numbers such that each entry, for example 3, is displayed (3%), without having to type it manually, i.e. a command to do it for each entry in my output matrix? Thanks a lot!
  12. B

    Mathematica Mathematica Connecting Plot Points

    Given a set of points in a list how can you not only plot them (which I know how to do) but how can you connected a line between each successive pair of points. i.e. { {Point1},{Point2},{Point3},...{PointN} } so that Point 1 has a straight line connecting to Point2, 2 to 3, 3 to...
  13. B

    Mathematica Mathematica Loop with Dot Product

    Basically, I'm trying to get the various entries of TT to be dotted with the various entries of KK. Each row of TT is a vector while in KK the elements are vectors. So I'm working with different dimensions, but should be able to "call" them still using the right command. My attempt is below...
  14. B

    Mathematica Calculating Distance Matrix in Mathematica

    I wanted to make a matrix whose elements are the Eucledian distance between row vectors in another matrix, obviously this matrix will be symmetric because distance(x,y) = distance(y,x). I have had no difficulty doing this in Matlab but I can't do it in Mathematica Here is my attempt A =...
  15. B

    Define Size of Matrix Piece by Piece in Loop: Mathematica Help

    Trying to define the size of a matrix by making a zero matrix then adding elements to it (piece by piece in a loop). Here is the general idea: U = ConstantArray[0, {3, 3}] // MatrixForm U[[2, 2]] = 2 (except in the actual code, I would use U[[i,j]] , for example). My error message...
  16. M

    Anyone familiar with Mathematica?

    I have 2 questions: 1. Solve sin x + cos x =Sqrt2, 0 lessthanequalto x lessthanequalto pi/2. I can't figure out how to input this question into Mathematica... 2. Find the equation of the tangent to the curve y = x^2+1 at the point (2,4) and plot both the tangent and the graph on...
  17. I

    Mathematica How to Specify Tick Number and Distance in Mathematica Plot?

    Hello, does anyone know how to specify the number of ticks to be labelled in a plot at an equal distance, without writing the list of positions explicitly? Thanks!
  18. G

    Mathematica [Mathematica] Simplify can't handle this trivial example

    Hi everyone, I'm wondering why Mathematica (8.0) can't bring this to the obvious form -1, and leaves the expression as is: Simplify[(b^8 + c^4) /a^8, a^8 + b^8 + c^4 == 0] Is there any nice and elegant way how to achieve that? (I know, that I could take e.g. /.c->(-a^8-b^8)^(1/4), but...
  19. S

    Mathematica Can You Exclude a Specific Number When Generating Random Numbers in Mathematica?

    I am trying to create a list of 5 random numbers between 1 and 20 In[62]:= RandomInteger[{1, 20}, 5] Out[62]:= {10, 11, 9, 8, 1} But is it possible to exclude the number 10 from appearing?
  20. I

    Mathematica Mathematica continuous evaluation

    Hello, I have a Mathematica code with Manipulate [] and a number of inputs. At the end I have ContinuousAction->False, but my code keeps repeating the evaluation, even when the inputs are not changing. Ideally, I would like it to evaluate once when an input is changed. But now it goes like...
  21. M

    Mathematica Mathematica - sorting NSolve solutions

    Hello, everyone. I have a code written in Mathematica that loads a single file in turn. Each file contains a 200×2 array of numbers which are x,y coordinates of points. I feed each line of each file in a loop that contains a NSolve equation system. The equation system returns 5 outputs for...
  22. S

    Mathematica Mathematica: Help with creating a more efficient algorithm

    I've created a simple algorithm to count primes up to say 1000 which satisfies a certain criterion : count = 0; Do[p = Prime[jj]; If[And[MultiplicativeOrder[2, p] == p - 1, MultiplicativeOrder[3, p] == p - 1], count = count + 1], {jj, 3, 1000}] count Now this algorithm works...
  23. S

    Mathematica How to Reverse Subsublist Elements in Mathematica?

    lis= {{{2, 1}, {3, 2}, {8, 2}}, {{9, 6}, {1, 0}, {0, 2}}} I am trying to reverse the subsublist so {2,1} becomes {1,2}, {3,2} becomes {2,3}... I have tried Map[Reverse, Flatten[lis, 1]] but this creates {{1,2},{2,3},{2,8},{6,9},{0,1},{2,0}} which erases my sublist Is there a way I...
  24. A

    Mathematica Mathematica Export to PDF problem

    Hi guys, I have a problem with exporting to PDF format from Mathematica 7.0. As seen in the attachment PlotLabel is correctly displayed in the note book (test.nb), but when I try to export it, some characters just don't seem to be displayed correctly (plot.pdf). I've tried the "Save...
  25. S

    Mathematica Create a Colorful Plot with Mathematica's ListPlot Function"

    If I have a list; list={ {{1, 2}, {1, 3}, {1, 5}}, {{2, 2}, {2, 4}, {2, 1}}, {{3, 3}, {3, 5}, {3, 2}} } and want to plot it using ListPlot[list] Is it possibe to colour all the 1st pairs of the list e.g. {1,2}, {2,2}, {3,3} blue, {1,3}, {2,4},{3,5} green and {1,5}, {2,1}, {3,2} red using...
  26. I

    Mathematica Mathematica conditional input field

    Hello, I need help constructing a drop-down menu in Mathematica with options depending on the selection from a previous drop-down menu. The example is first the user selects a continent, and then the second drop-down menu shows the respective countries. Any help would be much appreciated.
  27. G

    MATLAB Convert from mathematica to matlab

    Hello ,i have the following problem in mathematica and want to do it in matlab. mathematica : ... Walk1D[n_] := FoldList[Plus, 0, steps[n]] LastPoint1D[n_] := Fold[Plus, 0, steps[n]] ... nsteps = 200; nsq = Floor[Sqrt[nsteps]]; MeanSquareDistance1D[n_Integer, m_Integer] :=...
  28. Hepth

    Mathematica Mathematica : Will not perform integral

    I wish to integrate: \int dE \frac{\sqrt{E^2-m^2}}{E} \log \left(\frac{E-\sqrt{E^2-m^2}}{E+\sqrt{E^2-m^2}} \right) Integrate[ Sqrt[(El - m) (El + m)]/El Log[( (El -Sqrt[(El - ml) (El + ml)])/ (Sqrt[(El - ml) (El + ml)] + El))], El] But it won't do it. Anyone have any ideas as to why...
  29. N

    Mathematica Mathematica: how to read files?

    reading data from txt files there are two .txt files. One is map.txt, another is event.txt. map looks like below: dfafdafskdjf:{{0.837711763427 -0.8359730469 2.4152891949e-04 0.000360245716236} {0.831761777387 -0.8240730748 2.4446745066e-04 0.000359914513716} {0.819861805217 -0.8062231165...
  30. R

    Mathematica Mathematica Conjugate of a Function Assuming Real Variables

    Hi All, In mathematica, I'm trying to use Conjugate[] to take the complex conjugate of a function that has imaginary numbers in it, but I want to tell mathematica that the variables are real and positive, so that it can nicely combine terms into, say, x^2 instead of x*x. I've tried doing...
  31. R

    Mathematica Mathematica is remember variable values it shouldn't be

    Hi There, Once I put in values for variable farther down the code from when I first use them (I initially want them just in variable form, I don't want their values defined), every time I evaluate the cell mathematica puts the values in farther up. Even more disturbing, however, is in...
  32. G

    Mathematica [Mathematica] Redefining a built-in symbol

    Hello all :) I would like to redefine the built-in square root function. I have written this : mySqrt[z_]:=√z; Unprotect[Sqrt]; Sqrt[z_]:=If[Re[mySqrt[z]]+Im[mySqrt[z]]>0,mySqrt[z],-mySqrt[z]]; Protect[Sqrt] This works fine and redefine Sqrt[] as I want it to be. But, the symbol √ (by typing...
  33. J

    Mathematica How to Copy Large Equations from Mathematica into MathType?

    I want to copy and paste a very large equation from Mathematica into MathType in Word however MathType is saying my equation is too large. I need to do this for supplementary info for a publication. Any ideas?
  34. S

    Mathematica Mathematica: Iterating with 2 Lists

    If I have 2 list which are made up of pairs of numbers e.g. list1 = {{4, 5}, {2, 10}, {0, 15}} list2 = {{5, 2}, {3, 7}, {1, 12}} is there a way I can apply a function (that I have already created, f[x_]) on the lists which runs for e.g. 5 iterative steps with list1 then apply the same...
  35. Saladsamurai

    Mathematica Mathematica: Div in Cylindrical and Shadowing

    Mathematica: Div in Cylindrical and "Shadowing" I have a vector given in cylindrical coordinates. I know that the divergence of the vector should be zero. However, I am not sure why Mathematica is not returning zero. Also, the Div operator is showing up red (Div) and it is saying something...
  36. Saladsamurai

    Mathematica Mathematica: What is happening?

    Ok, I have either completely lost it (very likely) or Mathematica is being weird (much less likely). The finction D[f,x] is supposed to return the partial of f with respect to x, \partial{f}/\partial{x}. So I have a function V_\theta = (A/r^2 + B)\sin\theta where A and B are constants. So we...
  37. R

    Mathematica Mathematica: check if two functions are equal

    Hello All, Thanks in advance for any advice. I'm trying to evaluate whether or not a given wavefunction is a valid solution to the time-dependent schroedinger wave equation, the bottom line being that I want to check that two functions are equal to each other at all points (within a...
  38. M

    Mathematica Defining function of a vector and symbolic symmetric matrices- mathematica

    Hi all, I'd like to define a vector valued function in mathematica 7 as the exponential of a quadratic form, defined with respect to a purely symbolic matrix. What I want to do with it is to take derivatives with respect to the components of my vector, and evaluate the result when all...
  39. MathematicalPhysicist

    Mathematica How can I use Mathematica to perform sums with the condition of divisibility?

    I want to write down summation of the type \sum_{d|n , d<n} or \sum_{d|n} both summing over d. and d|n means d divides n. I know that I can use Sum[term, {i, n-1}] but I don't know how to use this condition of divisibility to the summation. any help? Thanks.
  40. N

    Mathematica Rank of Matrices in Mathematica

    The problem: I need to find the (minimal) rank of some matrix which is basically all parameters. For example, when i ask for the rank of \begin{pmatrix} a& b& c \\ d& e& f \\ g& h& i \end{pmatrix}, I get 3. I would like to get 1, since (excluding the possibility of a matrix of all 0's) it...
  41. P

    Solving Mathematica Problem with FindRoot Function

    Homework Statement I have a problem with program Mathematica and function FindRoot Homework Equations Relevent equations are in the mathematica document in attachment of this post. The Attempt at a Solution I tried in the same document but I don't get numerical value? What I...
  42. P

    Mathematica What are PrecisionGoal and WorkingPrecision in Mathematica?

    What means PrecisionGoal\rightarrow 6, WorkingPrecision \rightarrow 10? Can you explain what here is this numbers 6, and 10?
  43. F

    I am tired of using Maple, I am going to switch over to Mathematica

    Homework Statement That's right, Maple is the dumbest program in existence. Everything I try to erase a line by hitting delete or backspace, it won't disappear. When I want to use an function, I have to load a package ex. "Student Linear Algebra" to use a certain command. Sometimes the...
  44. J

    Mathematica Copy and paste from mathematica

    How can I copy an equation from mathematica into MS word so that it looks nice and is able to be edited using MS Equation's Editor/Mathtype? Thanks.
  45. O

    Mathematica Mathematica: solving an equation over a set

    I have a set of elements (matrices with symbolic entries and certain special properties) which I constructed in mathematica. I would like to identify the matrices in this (finite but large) set which solve a certain linear equation. I've tried to use Solve in conjunction with Assumptions but was...
  46. K

    Mathematica Can someone me on this problem using Mathematica

    Hi all, Please help me to improve the syntax which involving Do-loop function and solving simultaneous equations and summation together. the answer should match with the one given in the following cell. Many thanks for any feeback.
  47. S

    Mathematica I need a little bit help about mathematica

    Hello, my problem is that I could not be able to find to separate the roots with the command of FindRoot. Altough I have 2 non-linear equations, I can solve these with FindRooot, but I'd like to have separetely the roots I mean independent roots each other (x apart and y apart). I wonder if i...
  48. S

    Mathematica Mathematica: If statment for lists

    I want to create an If statement that states; if the elements in, list1>0 , true subtract list2, false keep value from list1 so that i end up with ans: {0,2,5,4} list1 = {0, 2, 8, 9} list2 = {1, 0, 3, 5} I don't know how to represent the elements in the lists so that my If statement works
  49. K

    How to Solve Simultaneous Equations in a Do-Loop with Mathematica 7?

    Hi all, I got stucked with the problem with regard to Do-Loop and solving simultaneous equations together. Please help me on this matter and the file is attached, Iam using Mathematica 7 Thanks
  50. J

    Mathematica Mathematica and large data arrays

    Hi, I have imported a data set from EXCEL that is 18 columns wide and 25 rows long. Each row of data appears within it own set of brackets as expected. I am able to pull out individual elements of the array. However, I want to plot column 2 vs column 4. How might I extract those two columns...
Back
Top