7
votes
2answers
715 views

How to do binary calculation?

For example, $a=0.10101$ in binary representation. Then how to calculate $a^2$ directly in mathematica? Is there any function turning binary into decimal? I only found its inverse...
4
votes
1answer
163 views

Adding z-value to mesh lines in Plot3D as is done in ContourPlot

Consider: f[x_, y_] = (x^3 + y^3)/(x^2 + y^2); Plot3D[f[x, y], {x, -1, 1}, {y, -1, 1}, MeshFunctions -> {#3 &}] Which produces this image: Is there a ...
2
votes
1answer
72 views

How to solve an equation given certain parameters?

I am new to Mathematica so please bear with me. I have an equation that has around 7 parameters and one unknown. I was able to use FindRoot to solve it; however, I ...
4
votes
1answer
69 views

Hold[Dataset[__]] not holding

With Hold[Dataset[Random[]]] instead of an expected Hold[Dataset[Random[]]] Can ...
4
votes
2answers
230 views

Plotting results from Findroot

I know this has been asked, but I cannot seem to understand the solutions. What I need to know, because I have my first domiciliary test this Monday, is how to plot the output from ...
2
votes
1answer
107 views

Problem with NDSolve and Sign

If c1 cnd c2 are zero, the code responds very well; but if one of c1 or ...
5
votes
3answers
377 views

how to concatenate a list of a list of strings

I have two lists of lists, La and Lb that I want to concatenate so that every element of a list n in La is concatenated with the corresponding element of list n in Lb. For example: La = {{P, O, O, O}...
0
votes
2answers
88 views

Not seeing line defined in an Epilog option

In the following code, the line defined in Epilog option of my 2nd parametric plot doesn't show up in the content pane of my ...
1
vote
1answer
95 views

Manipulate to determine $\delta$ given $\epsilon$ in continuity question

This is a continuation of a question I posed at: Examining the function $f(x,y)=xy(x^2-y^2)/(x^2+y^2)$. The quest is to analyze the partial derivative $$ f_x(x,y)=\begin{cases} \dfrac{y(x^4+4x^2y^2-...
5
votes
4answers
364 views

ReplaceAll is not working correctly

The line of code -E^(-I k) x /. {-x -> -x, -E^(-I k) x -> -E^(I k) x} is not properly replacing the exponential of (-I k) with the exponential of (I k), as ...
1
vote
1answer
54 views

Aligned data in ListPicker

Considering some data: ...
1
vote
1answer
103 views

NSolve non-analytic function

...
3
votes
1answer
180 views

Surface Area of a Region inside a Region

I need to find the surface area of a region which is within another region. The regions I'm working with are fairly complex and so I'm looking for a general solution, but I'll use a cylinder and ...
18
votes
2answers
364 views

10.2 Dataset extraneous print using Transpose

Bug introduced in 10.2 and fixed in 10.2 (by paclet update GeneralUtilities 10.2.1) This is probably patch code in 10.2. Is there a way to turn off print with ...
2
votes
1answer
70 views

Count graphs with fixed number of vertices incluing isomorphisms [closed]

I'm trying to use the listgraph function in the Combinatorica package: Needs["Combinatorica`"] g = ListGraphs[5]; ShowGraph /@ g However, it only returns all the ...
2
votes
1answer
113 views

Still more problems with Fitting, please help

I'm in a little over my head here and I'm fully aware of it, so I'm hoping for some help. I've been assigned to a project where I am given data: http://www.pastebin.ca/3061136 (Example Data) I ...
2
votes
1answer
58 views

Appending Delayed Evaluation

I have a function that need to be summed over all parameters given in a separate list. f[x_,y_,z_,n_,i_]:= (*Some function*); list={{n1,i1},{n2,i2},...}; I need ...
6
votes
1answer
117 views

Examining the function $f(x,y)=xy(x^2-y^2)/(x^2+y^2)$

Consider the function $$f(x,y)=\begin{cases} xy\dfrac{x^2-y^2}{x^2+y^2},&(x,y)\ne(0,0)\\ 0,&(x,y)=(0,0) \end{cases}$$ I can show that $f_x(0,0)=f_y(0,0)=0$. ...
3
votes
1answer
188 views

DiscretizeRegion on Raspberry Pi 2

Running DiscretizeRegion@Cuboid[] from the documentation under Raspbian on the Raspberry Pi 2, Mathematica version 10.0.0.0, gives the following response: ...
5
votes
1answer
155 views

memory leaks using NIntegrate on parallel kernel

Bug fixed in version 10.2.0 I'm running a large computation in parallel and the memory usage of the parallel kernels is increasing with every iteration of the calculation. Neither ...
2
votes
1answer
149 views

Why is there a difference when formulating patterns for Select and FirstPosition?

Select[{1, 2, 4, 7, 6, 2}, # > 2 &] Gives {4, 7, 6}. OK! So one should think that the following would work: ...
2
votes
0answers
105 views

Appropriate method for a Non-linear Optimisation Problem, With Linear Constraints, [closed]

I have a small non-linear, chess related, program with linear constraints and an objective function obtained from a polynomial probability generating function including some decision variables . At ...
4
votes
2answers
119 views

How should I evaluate the numerical integral of a function with divergent part substracted?

I want to evaluate the following integral numerically in Mathematica, $$\int_0^{\infty}(\frac{1}{(1 - e^t)^{10}} - (\frac{1}{t^{10}} - \frac{5}{t^9} + \frac{145}{12 t^8} - \frac{75}{ 4 t^7} + \frac{...
3
votes
3answers
238 views

Mathematica equivalent to gnuplot's fsteps option?

In a ListLinePlot I can set InterpolationOrder -> 0 to get the equivalent of gnuplot's ...
2
votes
1answer
65 views

BinaryWrite negative numbers [closed]

testList = {1, 2, 3, 4}; file = "test1"; BinaryWrite[file, testList]; BinaryReadList[file] Close[file]; Gives {1, 2, 3, 4} ...
5
votes
1answer
118 views

How to sort the ranges of a Piecewise expression?

I have the following PieceWise expression ...
2
votes
1answer
44 views

What workarounds are there to TagSetDelayed::tagpos?

My program creates an object based on an Association, with a custom head: g = Gate[<| "key1" -> val1 |>] I have ...
2
votes
1answer
328 views

Evaluating a surface integral

I'm trying to compute the integral $$\int_S x^2+z^2\,{\rm d}S,$$where $S$ is the surface $$S\colon~ \frac{x^2}{2} + \frac{y^2}{3} + \frac{z^2}{2} = 1, \quad y \geq 0.$$ One possible parametrization ...
2
votes
0answers
43 views

Basic Question: Split Nested list into respective elements [closed]

New to Mathematica, just have a very basic question to ask. I have a table of results like so: ...
6
votes
1answer
115 views

How can I see more of the Java stack trace when an exception occurs in JLink?

If I call into Java code via JLink`, and there is an uncaught exception, Mathematica produces a Java::excptn message, and prints ...
8
votes
1answer
1k views

What is included in Wolfram Extras?

I recently installed a new version of Mathematica and it includes an optional companion package entitled "Wolfram Extras". Is there any official documentation (release notes?) that details what ...
6
votes
1answer
165 views

How to draw curvy arrow at the edge of a cylinder

I would like to draw a figure similar to the attached here. What I ended up with is the following figure. I use the code: ...
0
votes
1answer
105 views

Adding code comments to a module [closed]

What is the best way to comment a long Module? For linear flowing calculations that need not be organised in modules, I usually mix text and math. But how can I do that inside a module, or block, or ...
2
votes
3answers
403 views

Fitting and plotting Weibull distribution

How can I find the best fitted 2-parameter Weibull's distribution (PDF) to describe my data? How can i plot my data and estimated distribution all in one graph? How can I show/compare results of ...
21
votes
2answers
439 views

Getting rid of spikes in the PDE solution

Bug introduced in 10.0 and fixed in 10.3 Note: In 10.0, Rationalize[fd, 0] was needed or mesh generation would fail. Preamble: I am solving a PDE in a domain ...
0
votes
1answer
87 views

Find all degenerate eigenvalues of a cubic equation

I have an equation that is cubic in w. The three solutions correspond to bands in a bandstructure, and are a function of wavevector ...
0
votes
1answer
338 views

How to Include multiple plots in a single Manipulate [closed]

For example if I had one function Sin[x]/x=c and a second one Cos[x]/x=c than Manipulate for ...
2
votes
3answers
169 views

Given a list of triangle vertices, how to find the neighbors for each vertex?

A triangle is represented by {a,b,c}, indicting that its vertex IDs are a, b, and ...
4
votes
0answers
152 views

How to export strings and figures as PDF in A4 format

I have a column consisting of strings and pictures, like this: ...
12
votes
1answer
270 views

How to add AccuracyGoal and PrecisionGoal options in a numerical function?

There are many built-in functions that contain AccuracyGoal, PrecisionGoal and ...
18
votes
4answers
1k views

Using Mathematica to solve a probability problem

The problem is from Principles of Statistics by M.G. Bulmer: In a certain survey of the work of chemical research workers, it was found, on the basis of extensive data, that on average each man ...
3
votes
2answers
264 views

An informative contour plot

I'm trying to visualise the graph of a function $f(x,y)$ of two real variables using ContourPlot. Here are the things I'm after: The points where $f(x,y)=0$ ...
4
votes
1answer
271 views

Averaging over a circle from FFT to plot the amplitude vs wavelength

I am trying to calculate the amplitude of FFT vs wavelength for some experiments. I had put a question here previously on how to compute the FFT of an image. Thanks to everyone who provided the ...
9
votes
1answer
126 views

Union on Associations (Kernel Kill)

Bug introduced in 10.1 and fixed in 10.2.0 Perhaps Union on Associations is not being encouraged since ...
3
votes
1answer
68 views

Fourier cosine series of displacement

I'm trying to calculate a Fourier Cosine Series of displacement for general 4-bar mechanism. My code not working. I don't understand why. I need the result as this form ...
6
votes
2answers
372 views

Round vs. Floor vs. Ceiling for non-integers non-orders-of-magnitude

I understand that Round give the nearest even integer for cases where the number is between two integers, i.e. Round[2.5] = 2 ...
1
vote
5answers
169 views

Select using MemberQ

I want to make a selection on this list ...
13
votes
2answers
371 views

Why does leaving and re-entering a context lose values defined in that context?

I'm getting unexpected behavior when beginning a new context, leaving it, and then re-entering it. Specifically, when re-entering the context, symbols that had been previously defined in that context ...
1
vote
2answers
59 views

Specifying the PlotRange according to a desired center

I have this plot of $f(x)=\ln x$ and the tangent line at $x=e$, and I'd like to specify the PlotRange so that it's the rectangle with its centroid at $(e,1)$, kind ...
4
votes
0answers
111 views

Inverse of piecewise function with pieces invertible on specific domain

I have piecewise continuous function defined below: f=Piecewise[{ {15 + 1/6*(# - 3), # <= 27}, {# - 12 + 4 * Exp[-5/24*(#-27)], 27 < #} }]; This ...

15 30 50 per page