All Questions

Filter by
Sorted by
Tagged with
2
votes
2answers
74 views

Searching for an element of one list in another list and replacement

I have two lists as follow: l = {"XY", "XT", "AB", "GT"}; ll = {{"x", "g", "f"}, {"x", "y", "l", "t"}, {"x", "c", "a", "b", "z"}, {"g", "t"}}; for each ...
2
votes
4answers
248 views

How to limit the argument to binary type in mathematica function

How do I write a function that only takes binary input?
2
votes
2answers
219 views

Manipulating several values from the same interval

Some of my calculations depend on the choice of several values from the interval [-2, 2] (it is more or less interpolation of a fixed function using the points as parameters). I want to create a ...
2
votes
1answer
1k views

Solve[Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] breaks when “Reals” is added?

Mathematica solves this equation fine: Solve[ Tan[theta] == (b*Sin[t])/(a*Cos[t]), theta] // InputForm ...
2
votes
2answers
285 views

Does mathematica 9 on mac depend on these dynamic libraries?

The Mac package installing program "brew" suggests I remove some of these dynamic libraries, but I am worried that mathematica 9 might depend on them. As far as mathematica 9 is concerned, is it OK to ...
2
votes
1answer
149 views

What am I missing!? Simple symbolic sum not simplifying

I'm VERY confused: in what universe is the following not zero? FullSimplify[2*Sum[Subscript[f, i], {i, 1, q}] - Sum[2*Subscript[f, i], {i, 1, q}]] Mathematica ...
2
votes
2answers
336 views

Adding Dynamic functionality to a Graph

I would like to make the edges and vertices of a Graph interactive, a simple demonstration is to change their colors: ...
2
votes
1answer
122 views

Finding the tangents of the function in each mesh

I have a 2D graphic which contains a table of curves within a circular region. ...
2
votes
1answer
157 views

Extracting Imported Information

What I want to do is to compare the relationship between the consumption of say beer and wine using scatter plots where each point designates the particular country (preferably named). I have tried to ...
2
votes
1answer
377 views

Unresolved differential equation [closed]

Why can't Mathematica solve this equation as stated? ...
2
votes
1answer
238 views

Any solution to system of equations?

I need ANY combination of 8 variables which satisfy: a+b+c+d+e+f+g+h=0 a^2+b^2+c^2+d^2+e^2+f^2+g^2+h^2=1 a*b+b*c+c*d+d*e+e*f+f*g+g*h+a*h>2/3 Ideally these ...
2
votes
1answer
339 views

Solve a system of non-linear equations

Is there any way to get an exact solution a system of non-linear equations? The system I would like to solve is: $\quad \quad \begin{eqnarray} h_{1}x_{1}=c_{1}\\ h_{2}x_{2}=c_{2}\\ h_{3}(1-x_{1}-x_{...
2
votes
3answers
707 views

plotting two Error List Plots in one

I made two ErrorListPlots ...
2
votes
3answers
280 views

Visualizing Base-10 Digits (0-9) As Corresponding Colors

Is there a way I can visualize my output (which happens to be in base-10 by default) with a specific color text corresponding to the digit (0 through 9)? Here is the key for the coloring scheme: 0: ...
2
votes
3answers
284 views

How can I use NestWhileList instead of While in this case?

OK, the problem occurred when I challenged with Project Euler No. 10 The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. My code is: ...
2
votes
2answers
82 views

Extra constant in solution of ODE using DSolve [closed]

A paper that I have states that the solution of the ODE $$-\frac{\left(\frac{\pi k}{a}\right)^2 Y(y)}{G_y}+\frac{Y''(y)}{G_x}+\frac{8 \theta }{\pi k}=0$$ is $$Y=A\sinh\left(\frac{k\pi\mu}{a}y\right)+...
2
votes
2answers
116 views

Insert at specific resulting positions in multidimensional list?

I have an initial "multidimensional" list (that is, a list that is not a vector): list0 = {{1},{2,3,4},{3,4},{5}}; and I want to insert elements ...
2
votes
0answers
224 views

Conceal GUI source code

I'm working with a simple software application written in Mathematica, composing of several .nb and .m files. The application is centered around a simple mathematica GUI, which includes several ...
2
votes
3answers
165 views

BarChart without axes neglects the last zero of a list

Creating a BarChart with {1, 2, 3, 0} as BarChart[{1, 2, 3, 0}, Axes -> False, Frame -> True] gives me only the first three bars, a chart identical to just ...
2
votes
2answers
2k views

Formatting results of a polynomial long division

I am teaching polynomial long division to my high school students. Not a pleasant topic to have to cover. I went to use Wolfram|Alpha and obviously, internally, they have a really elegant way to ...
2
votes
2answers
269 views

How to calculate the analytical result of this singular integral? [duplicate]

I'm trying to solve this integral: $I(a,b)=\displaystyle{\int_1^{\infty }\dfrac{e^{-ax}}{\sqrt{x^2-1} (1+x\sqrt{1-b^2}) (x-1/\sqrt{1-b^2})} \, dx} \,\, \,\,(a \;\textrm{real>0} \, , 0<b<1)$ ...
2
votes
1answer
153 views

Integrate and ConditionalExpression Output

I am integrating some difficult functions and using the conditional output to place bounds on parameters to ensure integrability, but it seems that not all of the conditions are being returned. The ...
2
votes
1answer
289 views

Step Monitor option in DifferentialEvolution

Using the "Step Monitor" option what exactly do I read? Does it show me the "best solution" for each population? Or does it show me each search point in the population? Also is there an integrated "...
2
votes
3answers
993 views

Function to Expand exponentials

Is there a function similar to PowerExpand which expand exponentials? This would, for example, take Exp[5(a + b)] and ...
2
votes
1answer
556 views

ParametricNDSolve with variable initial conditions [duplicate]

I have a large set of coupled non-linear first order ODEs describing the time evolution of multiple variables a[t]....z[t]. For most of these, I have fixed initial ...
2
votes
1answer
1k views

How to tell Mathematica not to simplify an expression

While there is this question with a very similar title, it does not answer my question, which is: I have part of an input, in my case Re[Exp[I*x]] which ...
2
votes
3answers
225 views

How to transform a 3D list to a 2D list?

I want to apply the command Histogram3D to an image.The image data is {{r1,g1,b1},{r2,g2,b2}...} And the input of ...
2
votes
1answer
184 views

Different outputs for Simplify

In at least one instance, the same Simplify command (without using options) produces very different results on two of my computers, one Windows 7 and the other ...
2
votes
2answers
140 views

Importing Data and Devoting Their Names to Them

There are some files in a directory. I have used of SetDiroctory to access all of them. SetDirectory["C:\\Users\\SE7EN\\Desktop\\mathematica\\test"]; I can visit ...
2
votes
4answers
109 views

Insert at specific resulting positions? (Another option) [duplicate]

I found the answer in this post very interesting to do what I need, but I would like something where I could provide a list to be modified, a ...
2
votes
2answers
175 views

Finding Minimium Periapse Distance Between Spacecraft and Planet

I have the following simple model that simulates a spacecraft orbiting Mars. What I'm hoping to do is be able to find the periapse radius of the spacecraft as I did below, except instead of using ...
2
votes
0answers
104 views

FourierCoefficient performance

I encountered weird performance issue while using FourierCoefficient[]. I narrowed it down to calculating $n$-th coefficient for $\cos(nx)$. ...
2
votes
2answers
380 views

How to solve analytically a 2D Sturm-Liouville Problem?

Maybe it is a syntax problem, since I haven't been using Mathematica for much time, but I haven't been able to find a similar example in internet. I am just trying to solve analitically the Sturm-...
2
votes
2answers
285 views

To change the pattern of sphere surface in Graphic3D

I used of this command to draw a sphere ...
2
votes
1answer
414 views

Problem with Label in a Do loop, “nolabel”

Can someone tell me why this code doesn't work and how to fix it ? Thanks. ...
2
votes
1answer
107 views

Compute the potential of confusion between two matrices

I have a problem. Any help will be appreciated. In order to calculate the accuracy, sensitivity, sensibility and F1 score between diseases and their symptoms, I have two matrices with a different ...
2
votes
3answers
253 views

binning list of lists in unequal bin lengths

I'm lookin for binning of ...
2
votes
1answer
102 views

Efficient Round edition with different rounding direction

As pointed out in this post, Mathematica has a special version of Round that Round rounds numbers of the form x.5 toward the nearest even integer. A comment by ...
2
votes
1answer
488 views

Plot data with different confidence intervals [closed]

I want to plot something like the graph in the figure. I have some points (data) and each of them is associated to two different confidence intervals, at 90% (red) and 95% (blue). These intervals can ...
2
votes
1answer
173 views

Will the solution NDSolveValue finds outside of the region I give it give me bogus results?

I'm using NDSolveValue to solve Laplace's equation for a relatively simple system. I have two rectangles, separated by a small gap, which I define using RegionDifference: ...
2
votes
1answer
134 views

Palette to set Cell Options such as Background Editable and Initialization property?

Hello I have found examples of codes that generate palettes to format the text of a cell (or a portion of it). I have also found codes for palettes that change the style of a cell. The latter is ...
2
votes
1answer
245 views

How to import and array of data?

I'm trying to import many files which have the same name "x.data", but they end with a extension "x_code1.data". I was trying to import all files with the routine: ...
2
votes
3answers
598 views

Export NDSolve results

I can see the correct result of my NDSolve when I plot them with large PlotPoints. ...
2
votes
1answer
126 views

Output of intermediate results from very long NDSolve computation into sequenced CSV files

There is a problem that I was not able to solve for months, if not years, and I can't postpone it any longer. It is this: I know how to output the result of a computation from NDSolve into a file ...
2
votes
1answer
173 views

Two dimensional high oscillated numerical integral

I have some problem with two dimensional integral. I want to calculate such integral. ...
2
votes
1answer
964 views

Why won't Mathematica obtain eigenvectors for this symmetric matrix?

The matrix is a real symmetric 4x4: ...
2
votes
1answer
356 views

Piecewise function extraction

I have a piecewise function and I'm trying to extract the different functions for different values of the parameter. I use: ...
2
votes
1answer
687 views

List Deconvolution

I have some experimental data to analyse. The function $f(t)$ that describes it is however convolved with a gaussian, due to finite resolution of our experiment. $f(t)$ is too complicated to be ...
2
votes
3answers
519 views

Is there a way to do conditional matrix loop using 'continue'

I have the following: ...
2
votes
1answer
2k views

Use Euler method to solve differential equation

Use Euler's Method or the Modified Euler's to solve the differential equation ${dy/dt=y^2+t^2-1, y(-2)=-2}$ on $[- 2, 2]$. Take h = 0.2 (...

15 30 50 per page
1
268 269
270
271 272
295