All Questions

Filter by
Sorted by
Tagged with
7
votes
1answer
1k views

How do I avoid the gaps introduced by a frame on a plot?

You can see that there are gaps on all sides of the plot between the frame and the extent of the line that I've plotted. How do I get rid of these? I'd like the frame to cover $[0,1]\times[0,1]$ and ...
3
votes
1answer
535 views

How can I get the general term of this recurrence equations?

Following is the recurrence relation: a[1] = 1; a[n_] := a[n - a[n - 1]] + 1 Array[a, 28] I tried to use RSolve, but it doesn'...
8
votes
1answer
461 views

How can I define a function that can accumulate its parameter?

For example, write a function add: add[3] return 3 add[4] return 7 add[10] return 17
0
votes
0answers
389 views

How to display detailed output in Mathematica [duplicate]

Possible Duplicate: Get a “step by step” evaluation in Mathematica How does Mathematica integrate? I want to display more detailed output from a calculation. The default command for calculation ...
2
votes
1answer
536 views

Using NDSolve solution as initial condition for another NDSolve

I have solved a PDE numerically using NDSolve, and I now need to be able to use that solution as an initial condition for another ...
6
votes
2answers
4k views

Why can't I define a commutator operator in this way?

I am trying to define some operators I use frequently. For example, I defined a KroneckerProduct operator as $\otimes $ as follows: ...
2
votes
1answer
2k views

Why does Mathematica fail to solve my equation?

I am trying to solve an equation using Mathematica, but I keep getting the following error Solve::nsmet: This system cannot be solved with the methods available to Solve. More importantly, it ...
0
votes
1answer
754 views

Calculating orbital period for the logistical map [closed]

I have the following MatLab code ...
13
votes
1answer
819 views

Can a LatticeData image be displayed in a space filled fashion

I'd like a FaceCenteredCubic image as in the in LatticeData docs, but space packed, and cropped on all the boundaries, so that it illustrates the geometry of the calculation that leads to the $\pi/\...
10
votes
2answers
736 views

Functions that remember their values

Can someone explain what is going on with the following ... func[y_] := func[y] = (Print["Hello world !!!"];) func[1] Hello world !!! ...
1
vote
1answer
4k views

Interpolating 2D data [duplicate]

Possible Duplicate: Interpolating 2D data with missing values I am trying to interpolate a 21x21 array of values. The 21x21 array sometimes has zero values and with the help of interpolation, I ...
24
votes
0answers
1k views

How would I improve this Karaoke machine code?

I was looking at a large collection of Import/Export user suggestions the other day and it dawned on me that we finally have MIDI import in Mathematica 9, which is rather interesting since MIDI ...
5
votes
0answers
271 views

What is the difference between Block and Module? [duplicate]

Possible Duplicate: What are the use cases for different scoping constructs? I don't understand the difference between the Matheamtica functions Block and <...
10
votes
2answers
460 views

How do I place a graphical marker (box, circle, …) in a MatrixPlot?

I'm trying to locate minima / maxima in matrices on a heat map. So I have my 2D matrix and did a MatrixPlot, and I can find the position of the smallest value. My ...
3
votes
3answers
311 views

How can I expand a inequality with Abs

I want Abs[x] + Abs[y] <= 1 to be convert to ...
6
votes
6answers
1k views

Make the code shorter for solving Fizz buzz

Here is Fizz buzz Write a program that prints the integers from 1 to 100. But for multiples of 3 print "Fizz" instead of the number and for the multiples of 5 print "Buzz". For numbers which ...
3
votes
1answer
204 views

Can this Part shortcut key be made to work with version 9?

In version 8 I was a frequent user of the "Use shortcut keys to easily type〚 and 〛" trick. In version 9, when I try to make the necessary change to ...
7
votes
2answers
4k views

How do I draw lines perpendicular to contour lines on ListPlot3D?

I am plotting the voltage in a pool of water with two electrodes. I have contour lines on my graph at every volt, but I would like to show the electric field lines which are going to be ...
6
votes
2answers
2k views

Interactive 3D plot in web browser?

Are there any ways to show a mathematica plot in a web browser so that the user can rotate it and such? I am open to embedding it in a web page - or some other method such as porting it to a ...
1
vote
1answer
3k views

How to understand and use DSolve solution

This equation is simple to DSolve in Mathematica, but I don't know how to use and understand solution. ...
1
vote
0answers
306 views

How to control Boundary conditions after integrating over piecewise function?

The following code ...
1
vote
1answer
987 views

Fitting parameters of user defined function returning discrete values

So, I'm fairly new to Mathematica (apologies in advance for the noobiness), and I'm having some problems regarding fitting the parameters of a user defined function to data. I'll give a representative ...
5
votes
2answers
6k views

How do I plot a solution of a differential equation?

I am having trouble generating a plot for a solution to my differential equations. I always end up with just blank axes. ...
1
vote
0answers
80 views

Consistently annoying error messages in Mathematica 9 [duplicate]

Possible Duplicate: Strange ::usage behavior in v9 Has anyone had any issues with a function, let's call it Function, which worked in Mathematica 8 getting the error message StringMatchQ::strse: ...
12
votes
4answers
1k views

How to rebuild original data from a histogram?

I have data in the following form. I have a list of values and a list of frequencies that indicate how often each value has occurred. Example list of values: ...
5
votes
1answer
160 views

Loading graphics consumes execution time

I have created a grid, and also made a list of control objects(ex:inputfields, buttons, etc..). Then, I lay the list in my grid. There is no problem. However, the final layout takes a lot of time. I ...
3
votes
1answer
307 views

Welcome screen (V9): selecting notebook from Open Recent … results in initialization cells not evaluating

The following represents an abbreviated example of more complicated code, but it replicates a problem the more complicated code encounters. ...
6
votes
1answer
182 views

How to write a MathLink function in C that returns nothing

What is the proper way to write a C MathLink function that returns nothing at all? The following works, but I'm not sure if all this work is actually necessary: The template file: ...
2
votes
1answer
2k views

How do I overlay a histogram with a plot of CDF?

...
15
votes
2answers
1k views

Vlookup function as Excel in Mathematica

How can we create a Vlookup function, similar to what we have in Excel? So if we have a table a and another b, we could add ...
13
votes
3answers
994 views

Using LinkSnooper for monitoring the communication with an installable MathLink program

How can I monitor the communication between an installable MathLink program and the kernel? Can LinkSnooper do this?
1
vote
1answer
320 views

How to transform equation

Is there any possible way to write this equation of 4th order as a system of two diff equations of second order with two new variables and to do that automatically? statespace command is transforming ...
10
votes
3answers
487 views

Sinusoid modelling

There are lots of great demonstrations that show how to get periodic functions in the unit circle. I'm wondering how hard it would be to simulate a "moving grid" similar to this video on youtube (...
6
votes
1answer
1k views

How can I deal with an NDSolve::ivone message regarding boundary values?

I have a question regarding the error message: ...
2
votes
0answers
182 views

Programming Mathematica - Introduction by Paul Wellin [duplicate]

Possible Duplicate: Where can I find examples of good Mathematica programming practice? Can anyone recommend a decent book on programming mathematica ? I came across this which looks to be a more ...
5
votes
1answer
198 views

how to print stack trace when TimeConstrained times out

According to the documentation, TimeConstrained generates an interrupt which interrupts the computation. This interrupt is treated just like an abort, at least in ...
3
votes
1answer
574 views

Determining the partitioning of Do loop iterations between kernels?

Say I have some Do loop that I'd like to evaluate in parallel: Do[Something, {i, 1, M}]. I'd like to split this list up into ...
7
votes
4answers
2k views

BoxWhiskerPlot - how to specify boxes position on the horizontal axis

Let's say I have a folowing set of data: k = 1 : list of values k = 3 : list of values k = 10 : list of values I know that to make a BoxWhiskerChart I have to ...
0
votes
1answer
231 views

simplification rule with symmetry

What rule can you think of to replace the first line by the second? I have a bunch of expression like these, which I would like to simplify. All dependent cross terms must be written in the same ...
3
votes
1answer
725 views

Combinatorica vs Built-in functions: Use of MinimumSpanningTree

What kind of argument is expected by MinimumSpanningTree (from the package Combinatorica`)? Is it possible that I am providing ...
6
votes
3answers
772 views

How can I rewrite this with NestList or FoldList?

The original code used For: ...
60
votes
3answers
4k views

Applying TextRecognize on alpha-numerical table

From time to time I have to extract data from scanned papers or rasterized PDFs. Imagine a table of the following kind (but much longer): A naive application of ...
4
votes
2answers
1k views

Ways to plot interpolating functions more economically?

I am interpolating a lot of data over geographic coordinates obtained via GPS, and frequently I need to plot these interpolated functions together. For example, I may have an interpolated elevation ...
26
votes
2answers
752 views

Evaluation of OptionValue[]

I have a function that takes an OptionsPattern and I want to access several options, say a, and ...
6
votes
1answer
197 views

Estimate Imagesize of any given Particular Control object?

I make different controls(InputFields,Text,panel, etc) in my code for which the corresponding code is below. ...
2
votes
1answer
202 views

Understanding a slowdown associated with wrapping a set of nested Do loops with a ParallelDo expression

I have a set of set of nested Do loops that require data from three different arrays (though the position from each array is fixed per cycle of the outer Do loop). Let's call these arrays: ListA, ...
5
votes
1answer
1k views

symbolic integration of a definite integral, how to speed up

I am wondering what are the general tips & hints for speeding up symbolic integration. As far as I understand, it solely depends on the form a function is represented before it is processed by <...
3
votes
1answer
605 views

Efficiently finding the maximum value of a column in a matrix

Imagine I have a matrix of the following form: TestArray = $((a_1,b_1,...),(a_2,b_2,...),(a_3,b_3,...),...)$, where a specific example might be: TestArray = $((10^6,1,...),(10^7,7,...),(10^3,4,...))...
14
votes
3answers
27k views

How can I transpose x and y axis on a Plot?

This question has appeared in various forms online, but I have not yet seen a complete answer, so I am posting it here. More specifically, suppose I have a function ...
4
votes
1answer
420 views

install mathematica 9 on linux encounter “Glibc_2.4” not found

I tried install mathematica 9 on linux. The whole process is fine. After the installation. I type "mathematica", and came up following lines: /usr/local/Wolfram/Mathematica/9.0/SystemFiles/FrontEnd/...

15 30 50 per page