What is Mathematica: Definition and 1000 Discussions

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

    MATLAB Mathematica Packages VS Matlab

    Just wondering if its possible to run a Mathematica package (package.m) on a computer that also has a copy of Matlab; because my university computer also has Matlab <..meh...> and I can't uninstall it and whenever I try to use the import functino etc... it thinks that the file is from Matlab and...
  2. D

    Mathematica Mathematica Returning Conditional Expression

    I am attempting to do a simple volume integral over a particular shape. However Mathematica will not simply return an answer. For my input Volume = Integrate[ Integrate[Integrate[1, {z, 0, c}], {y, 0, b}], {x, 0, a}] + Integrate[ Integrate[Integrate[1, {z, c, c + a}], {y, b/2, b...
  3. W

    Mathematica Combine ListPlot and ErrorListPlot in Mathematica?

    Combine ListPlot and ErrorListPlot in Mathematica?? Hello, I'm pretty new to Mathematica and I'm having a problem getting error bars on a plot. I've been using ListPlot to graph points and then edit the appearance of the graph / include legend etc by: ListPlot["meansdata", Frame ->...
  4. C

    Mathematica Mathematica and systems of equations

    I'd like to write (so not calculate, just "publish") some notes using mathematica. My very big problem in fact is the text-mode... How could I write a system of equations in mathematica, so that it appears "beauty", divided into multiple lines? I don't want something like this: f =...
  5. P

    Mathematica Help VectorPlot ODE - Need help

    Homework Statement Produce a graphical display of the solutions for the ode: y''+8y'-9y=22e^(2t) Homework Equations The Attempt at a Solution VectorPlot[{1, y'' + 8 y' - 9 y}, {x, -3, 3}, {y, -3, 3}] Doesn't seem to work, because it just gives me a graph of horizontal line. I...
  6. B

    Mathematica How Do I Import and Average a Vector from a Notebook File in Mathematica?

    hi... I have written a Notebook.nb file which generates a vector according to certain criteria... and I need to repeatly re-import the last value (the vector) from the notebook, and the vector is kinda-random (so I need to rerun the first file each time I call it in my new code) and then...
  7. A

    Mathematica FindRoot with 2 variables plus parameters (Mathematica)

    Hi all, I have a hard time finding roots to the following system of equations in 2 unknowns (p,q): eq1 = Pu == f(q, alfa, beta) eq2 = Ql == g(p, alfa, beta) If the 2 parameters (alfa, beta) are given numerical values beforehand, no issue. But I would like to retain the parameters in...
  8. A

    Mathematica Non-integrable multiple integrals for Mathematica

    “Non-integrable” multiple integrals for Mathematica Dear all, I have been trying to crack one problem in Mathematica, but I keep getting a wrong answer probably because I have something either fundamentally wrong analytically or code wise. OK, here is the problem. Suppose we have to...
  9. I

    Mathematica Help Need to write a Mathematica function

    I need help writing a Mathematica 8 function that takes a prime p as input and returns a list of the nonequivalent Pythagorean triples mod p. For example, PythagoreanTriples[13] should return the list; {{1,3,6},{1,4,2},{2,5,4},{2,6,1},{3,4,5},{5,6,3}}
  10. N

    Mathematica Creating Simple Arrays in Mathematica for Beginners

    Hello, I have a list {a,b,c,d} and i want a array of the form: {{a,b},{b,c},{c,d}} I think it is easy, but I'm new in mathematica and I don't know what funtion to use. Thanks.
  11. P

    Mathematica Solutions for First Order Differential Equation

    Mathematica Disagrees with ME! Homework Statement (2xy-5)dx+(x^2+y^2)dy=0 y(3)=1 Homework Equations The Attempt at a Solution Ive solved this by hand and now where required to get Mathematica to solve to. My solution: -17/3=x^2y-5x+y^3/3 I've attached what mathematica has...
  12. M

    Mathematica Mathematica: two animations, one slider

    Hello everyone. I have two animations in Mathematica, each with 187 frames. I would like to put one in a corner of the other and for them to share a slider so they both respond to it simultaneously. Martin
  13. K

    Mathematica Mathematica: Change the data from column to row

    Hi, I have put my data in column form ( a large number of data) in Notepad. I have attached example of the data. I know how to import it into Mathematica. However I face the problem to change the whole set of data to row form in Mathematica so that I can plot the histogram in Mathematica. Thanks.
  14. A

    Mathematica Mathematica: array of functions

    Hi intelligent people, Forgive me for a silly question, but I am really new to Mathematica and thus I need your help for my own research (I am done constructing NIntegrate values for some "non-integrable" functions, involving multiple steps, and I am kinda stuck at the last step. Here is the...
  15. A

    Need help to solve FFT and IFFT by mathematica

    Homework Statement I want to solve FFT and IFFT in the same problem. My function is Exp[2*(1 + I*c)*T^2]. For FFT, I used the following code: ClearAll["Global'*"] c = 0; f[t_] = Exp[-(1 + I*c)*2*t^2]; sampleTime = .01; data1 = Table[f[t], {t, -5, 5, sampleTime}]; freq1 =...
  16. P

    Solve ODEs in Mathematica w/ (2xy-5)dx+(x^2+y^2)dy=0 and y(3)=1

    Homework Statement I have solved this by hand but we are also required to get Mathematica to spit out a solution and I need some help. (2xy-5)dx+(x^2+y^2)dy=0 , y(3)=1 Homework Equations The Attempt at a Solution I know the command is DSolve but I don't know how to put in dx...
  17. B

    Mathematica Matrix Systems of ODEs - Mathematica

    Matrix Systems of ODEs -- Mathematica I'm trying to solve the classic "systemm of linear ODEs" of the form: Y(t)' = X*Y(t) Its homogenous, so it wouldn't hurt to rewrite it as Y(t)' - X*Y(t) = 0 (if that helps?) so here is my attempt at the solution solExp == NDSolve[Y'[t] ==...
  18. 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?
  19. 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...
  20. 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 +...
  21. M

    A question about quantum group calculations in mathematica

    Homework Statement Hi. My question is about braid relations and yang-baxter equation. braiding operators should satisfy the relations given in pdf file. But according to my mathematica calculation one braiding operator does not satisfy the relations.where did I make a mistake? I include...
  22. 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...
  23. S

    Mathematica modelling question

    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...
  24. 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...
  25. 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...
  26. 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...
  27. 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...
  28. 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...
  29. 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!
  30. 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...
  31. 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...
  32. 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 =...
  33. 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...
  34. 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...
  35. 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!
  36. 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...
  37. 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?
  38. 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...
  39. 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...
  40. 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...
  41. S

    Mathematica Mathematica: Reversing sublist

    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...
  42. 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...
  43. 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...
  44. 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.
  45. 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] :=...
  46. 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...
  47. 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...
  48. 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...
  49. 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...
  50. 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...
Back
Top