3
votes
2answers
135 views

Moving a locator based on the movement of another

My problem is: I want two Locators to simulate a vector in the following sense: The first Locator is the base and the second ...
3
votes
2answers
427 views

Color of a plane in Contourplot3D

I have the following code example: ...
3
votes
2answers
197 views

Interpolating a sparse list of two-dimensional coordinates

I've run into a problem where I have an ordered array of sets of coordinates, for example: ...
3
votes
1answer
683 views

A rotation-like transform on a matrix

Do not be confused with comments, those are for previous version of the question - Kuba Imagine I have a matrix of the form: ...
3
votes
2answers
1k views

Units, plotting and empty plots

maybe I'm completely newbie but I can't understand the behavior of units and the command plot. I'm doing some easy plotting of the state equation for gasses: ...
3
votes
1answer
156 views

Issue with scope of variables

For the definitions, t = 1; f[x_, y_] := t (x + y); v[3] := {1, 1}; g[u_] := f[v[u][[1]], v[u][[2]]]; the following two expressions yield different results, ...
3
votes
2answers
491 views

RecurrenceTable with a recurrence function of two variables

I have to calculate the cool down process of a regenerative heat exchanger. I solved the problem in Excel before, but now I want to do it with Mathematica. I want to create a table with the variables ...
3
votes
1answer
279 views

Equating two lists, element by element

Say you have two lists: listA = {a, b, c} listB = {d, e, f} How would you produce a listC that equates each of the two's ...
3
votes
1answer
319 views

How to configure two Mathematica in different places with different settings

For some reasons, I should use two language versions Mathematica. The most reason is I want to see the comparison of Help page(English version and Chinese version) to improve my English, both are ...
3
votes
3answers
190 views

Picking certain pairs according to a condition [duplicate]

I'm a Mathematica beginner and can't find out a solution to my problem. I have a list of pairs of numbers, for example something like this, but much longer: list={{2., 3.}, {3., 2.}, {5., 4.}, {4., ...
3
votes
2answers
817 views

How can I consistently get a good logistic regression fit?

I'm executing the command NonlinearModelFit[data, c/(1 + a Exp[-b x]), {a, b, c}, x] with the data being ...
3
votes
1answer
1k views

Plot FindRoot for non-trivial function

I would like to plot the results of FindRoot over certain range of inputs. I tried to do this with the code: ...
3
votes
2answers
350 views

How can you combine lines in $\LaTeX$ and lines in Mathematica?

Suppose that you want to make a report about the golden section algorithm, and you want to explain the process with text in $\LaTeX$, and in every iteration you want to show in that report the values ...
3
votes
1answer
1k views

Join a piecewise plot

I wrote some code to get a piecewise plot which is displayed correctly. Now I'd like to join the various parts of the plot, using some kind of interpolation, to get a continuous chart even though it's ...
3
votes
2answers
778 views

Save variables values and definition

I used to do a lot of programming in R and recently switched to Mathematica. One thing that bothers me is that I haven't found a way to save variables, their values and definition! Let's look at an ...
3
votes
1answer
833 views

How do I read a CSV file and remove comments from it

I have very recently started using Mathematica 9.0 Home Edition and am trying to understand it as best I can so please be tolerant ;). I have a file of data (sugar.csv) which contains blood sugar ...
3
votes
2answers
519 views

Combining and separating sums

How can I combine or separate sums in Mathematica in the way that Together or Expand work for rational expressions? For ...
3
votes
2answers
829 views

How can I control the number format of exported data?

I'm having issues while exporting a tables of numerical values to "*.dat" data files. Here's the thing, sometimes when I export a table, I get more decimals on some random values. The problem is that ...
3
votes
5answers
592 views

How to combine some elements of a list?

In order to simplify my expression, I face a list manipulation problem. For example, given the input list ...
3
votes
1answer
782 views

Trying to plot a velocity profile in x-y plane

I have a velocity profile for two liquids on top of each other in a pressure driven channel. The profile is supposed to be parabolic. I plotted them up, but I can't manage to plot them in the x-y ...
3
votes
2answers
526 views

Deleting Print results

While playing around with $Pre and $Post I created this very annoying piece of code: ...
3
votes
1answer
458 views

Running external pdflatex command and importing the generated PDF document

There have been a couple of questions about incorporating labels and equations that were typeset in $\LaTeX$ into a Mathematica notebook. Ideally, this requires running ...
3
votes
3answers
824 views

How can I solve Tan[t] - t == F[x] for t as a function of x?

How can I solve the equation Tan[t] - t = Ax, where A is a constant for t[x]? I know that ...
3
votes
0answers
279 views

Parallel PowerMod

Is there anyway to parallelize the PowerMod function? Here is my Left-To-Right modular exponentation: ...
3
votes
2answers
3k views

Plot Even Piecewise function

Is it possible in Mathematica to plot an even piecewise function like: $ f(x) = \begin{cases} 3t , 0 \le t \le \frac{\pi}{2} \\ 3t + 6 , \frac{\pi}{2} \le t \le \pi \end{cases}$ which has ...
3
votes
1answer
240 views

Customizing FrameTicks in DistributionChart

So I have been fighting with this for a while. I'm trying to get custom frame ticks on both the left and right side of a DistributionChart. It's not going very ...
3
votes
3answers
3k views

DSolve gives complex function although the solution is a real one

I have a problem with the DSolve[] command in mathematica 8. Solving the the following 4th order differential equation spits out a complex solution although it should be a real one. The equation is: ...
3
votes
9answers
2k views

How to find palindromic numbers (Project Euler #4)?

I'm trying to solve the fourth Project Euler's problem with this: ...
3
votes
3answers
526 views

How to simplify the following trigonometry expression such that the number of used characters is minimal?

How to simplify the following trigonometry expression such that the number of used characters is minimal? (13*Cos[t] - 5*Cos[2*t] - 2*Cos[3*t] - Cos[4*t])/4 The ...
3
votes
2answers
168 views

Is there a quick way to find a built-in function by name search?

Is there a quick way to search all built-in Mathematica functions by name? Say I want to find all functions whose name contains "Graph", such as GraphPlot, NeighborhoodGraph, Subgraph, and so forth. ...
3
votes
2answers
662 views

How can I assign a Fit result to a function?

I have this code ...
3
votes
2answers
208 views

Why am I not getting a numeric response?

Code ...
3
votes
1answer
602 views

Randomly selecting elements without repetition

I assigned energy values to each element in the array as per the program of Verbeia. The program looks like this ...
3
votes
1answer
225 views

Exchange axes in ListLinePlot

I'm sorry to do this right off the bat, but I have the following set of data: ...
3
votes
2answers
377 views

Pattern test for variables during function definition

I am having a problem with pattern testing on variables during function definition ...
2
votes
1answer
100 views

Equal flow boundary conditions

I'm having the following issue that can not find a solution , by using this boundary condition v[0, t] == u[1, t] that Mathematica does not understand, someone ...
2
votes
3answers
69 views

Create region from polygons and tangential line segments

I have two circles and tangential line segments that I want to define a region: ...
2
votes
0answers
90 views

Evaluating Real and Imaginary parts in a dispersion equation via ContourPlot [closed]

I want to reproduce a dispersion curve from P. Zou's thesis found here: http://www.ipd.anl.gov/anlpubs/2001/06/39620.pdf on Pg. 31, Eq. 2.13. The problem is, the code below only gives values for the ...
2
votes
1answer
79 views

Simplifying Expressions for FindMinimum

I am currently trying to apply the FindMinimum function to find the lowest energy of an expression. My current expression as of now is relatively complicated. It is the summation of 48 similar terms, ...
2
votes
1answer
103 views

How to use Compile to generate an $n\times n$ array using $n$ vectors

Let's consider the following: ...
2
votes
1answer
62 views

Stopping NDSolver at time of error

I am using NDSolver and WhenEvent to solve a system of differential equations. I get this message: ...
2
votes
1answer
160 views

Confusion with SplineFit (Angle calculation)

This question is continuation to this other one I am creating polymers (where each monomer is of equal length) using this method: ...
2
votes
1answer
81 views

Does DynamicModule cure Problem with Manipulate?

Hopefully, this is a final cure for the Problem with Manipulate introduced on A problem with Manipulate and then continued on Continuation of a Problem with Manipulate. Michael E2 suggested on the ...
2
votes
1answer
60 views

How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function?

How to NDSolve a set of equations, one of which itself contains NIntegrate of a desired function waited to be solved by NDSolve first? For example, ...
2
votes
1answer
70 views

How to use Buttons to run alternate Manipulate functions

I wish to use Buttons to trigger alternate Manipulates. According to the documentation: "The first argument to Button is the label" ....and the "second argument is the function that will ...
2
votes
2answers
111 views
2
votes
2answers
106 views

Color points in ListPointPlot3D

I have some 3d points with coordinates and a value assigned to each point. I want to plot the points and depending on the value use a different color. I have tried to use the answer in ListPlot3D - ...
2
votes
2answers
88 views

Recursion problem

I try to make designation a = {Subscript[a,1], Subscript[a,2], Subscript[a,3]} but receive mistake $RecursionLimit::reclim: Recursion depth of 1024 ...
2
votes
1answer
66 views

Arrange equation in normal form

Is there a way, or if not, how could one define a function which takes an equation in any form (for example as given by FullSimplify): $$(A+X_0) x+By=3x$$ and ...

15 30 50 per page