# All Questions

279 views

### Dynamic matrix multiplication

I have the following problem: I want to multiply two matrices and sum them to another matrix C. A.B+ 2B Easy! The matrix A varies as a function of three inputs a,b and c. The second matrix, B, is a ...
222 views

### Problem with dynamic MouseAppearance updating while “MouseDown”

my problem is with combining EventHandler and MouseAppearance. I want to change cursor appearance if I have primary button ...
1k views

### How can I solve this PDE with initial conditions?

I wish to solve the following second order partial differential equation $$u_{tt}=c^2 u_{xx}$$ with the initial conditions $$u(x,0)=e^x,\quad u_t(x,0)=\sin x$$ In Mathematica, I evaluated the ...
151 views

...
262 views

### How to find Image Size of a control object?

I want to find the ImageSize or at least dimensions of any control object irrespective of it being an image or an any other control such as ...
232 views

### Display function value on hover?

I have used Manipulate in conjunction with Plot to draw a function's graph and I would like to show the current x-axis value and function value while hovering over the function's plot. How can I ...
239 views

### Show does not combine the plots

i've the following problem: because it's not possible to plot complex numbers (or is it?) i created my own "function": ...
90 views

### Pattern matching not going over a list when using default values

if I execute the following command in Mathematica: {a,a^2,a^3}/.a^(n_:1)->b^(2 n) Mathematica returns: {b^2,b^4,b^6} ...
329 views

### FrameTicks and GridLines in DateListPlot

I would like to know what is the best way to configure one GridLine for the hour in LightGray and another for the days in ...
304 views

### How to insert a link to a generic file, in the middle of a text style cell/paragraph?

It is easy to insert a Hyperlink to a notebook file, or to an internet address, in the middle of a text style cell (Ctrl+Shift+H or menu: Insert->hyperlink). Trying to create a hyperlink to a file ...
485 views

### Solving Integrals

Here's a problem that I don't understand. f[x_] := Exp[Cos[3*x]] g[x_] := (1/3)*x^3 - x^2 + 2 When I try to find the limit: ...
151 views

### Button doesn't evaluate variable containing Module

I have a huge set of code to accomplish a data transformation. I have saved this set of code as eg: ...
270 views

### a problem about simplifing conjugate

the situation is as follows ...
257 views

### Exporting/Importing a Table of complex numbers

I'm generating a long table of list of the form: PN={{1,2,1+i},{3.5,2.6,2}...},{...},... Using: Export["PN.dat", PN, "Table"] ...
384 views

### Fast Trial Division

I'm going to write a custom Trial Division primality test. I know that PrimeQ will first try trial division and then switches to ...
104 views

### How to grab CellTags from a Cell?

I am in the process of creating a palette for a specialised "Save as HTML". For context please see this. How can I grab the CellTags from a Cell[...] object? This is my first iteration, aka testing ...
101 views

### Dealing with errors and resuming the code after one

How can I write my Mathematica code so that it resumes at a specific place if any Message is displayed during the execution of an expression? For example, in Visual ...
299 views

### How to export multiple Barcharts from Mathematica to $\LaTeX$

I have to make a document with multiple bar charts and export it: ...
167 views

### SetAccuracy behavior

I'm puzzled by the output I get from SetAccuracy. According to the documentation, when SetAccuracy is used to increase the ...
265 views

### How to pull scalars out of a function that should act on lists?

Suppose I have A = a vecA B = b vecB where a and b are supposed to be arbitrary scalars ...
395 views

### Add two Histograms to calculate summed Mean and StandardDeviation

As a follow up to this question: Calculate mean and standard deviation from ImageHistogram I would like to add two histograms before calculating the mean and StDev. I would like to sum the numbers, ...
858 views

### Finding the Minimum value of an interpolating function

I can't seem to use FindMinValue to find the min. value of a curve represented by an interpolating function. For instance the below code generates an interpolating ...
520 views

### can mathematica plot graph/visualize rotation matrices

just wondering is there any example online that show plotting of 3d rotation matrices like in the picture below (source)
392 views

### Don't simplify an expression

I have an expression that I want Mathematica to fully expand without any simplification afterwards. I want the output to look like the following example. ...
846 views

### Improving NDSolve speed for heavily stiff problems

Having looked around the intergoogles and Mathematica.SE, I thought I'd pose a question with a minimum working example. Here is the situation I am trying to improve: I am solving a 4th order non ...
499 views

### Faster code for specific problem

Sorry, but I need the following code much faster and I'm running out of ideas. I do appreciate any help. I post two of my fastest ideas (tab and mat), although they are not really fast. Thanks in ...
215 views

### LetL and Module efficiency

I was recently introduced to the LetL macro thanks to Leonid's answer to one of my prior questions. I was, needless to say, impressed by the simplicity of its ...
315 views

### wrong use of _?NumberQ?

I am having trouble with a numerical exercise. Here's a simplified version of my problem. I define two functions to find the solution to two constrained maximization problems: ...
132 views

### Manipulate not showing anything

This works: Manipulate[Plot[2*x + 3*y, {x, 3, 4}], {y, 3, 4}] But this doesn't ...
362 views

### Precision of number not maintained when saved via Export

Assume that the output of my calculation is a and is a number such as: a = 100.1252135246354847; ...
415 views

### Mathematica PDF import and fonts

I am trying to put nice LaTeX labels on my Mathematica plots. I can do this manually, or by introducing an extra GNUPlot step into my workflow, but it would streamline the process considerably if ...
223 views

### Could the PrecisionGoal for NDSolve be a negative number?

The help of Mathematica doesn't say so much about the PrecisionGoal for NDSolve, and I never considered much about it even after ...
809 views

### Converting numbers to integers

I've read the available documentation but I still haven't found an NumberForm -> Integer function yet. No result in this site's search, either. Does it exist? ...
248 views

### Strange result when integrating BesselJ functions

Consider the following integral: ...
311 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 ...
464 views

### A dot appearing after a zero, and making the entries of a matrix into fractions

For more info about the difference between 0. and 0 I am a self-taught Mathematica user and I have some elementary questions-- perhaps too elementary for this site, but here they are. If ...
482 views

Don't you just love it when your computer is working fine, you work with some good examples, everything is wonderful and your relationship with your computer is the best? I do. But what happens when ...
201 views

### SetOptions or other approach to imposing default styling of text in a BarChart Legend?

Gustavo Delfino's answer to an earlier question showed that it is possible to use the third argument to Placed to format text in a ...
345 views

### Animate a position change along the curve for every iteration

I've only had few previous experiences on Mathematica before. So basically an entry-level question that harasses a rookie like me. I made the following attempt using bisection method to calculate ...
454 views

### How to use summation to get the value of a binary number?

How to use summation to get the value of a binary number? I want to do this: $(x_{n}x_{n-1}...x_{0})=\sum_{i=0}^{n}x_{i}\cdot b^{i}$ But it seems that I can only do something like this: ...
295 views

### Support for Compressed Sparse Column sparse matrix representation

Is there native support for Compressed Sparse Column (CSC) format for sparse matrices, like importing and manipulating them?
1k views

### Plot CSV-data; make statistical statements in Mathematica / WA

First, I'm quite new to Mathematica so sorry in advance if some questions seem to be trivial. I have a CSV-file which looks like this: ...
493 views

### How to replace all occurrences of an element in a list?

Consider the following: list={1,2,2,2,3}; I would like to replace all 2 with the string "Test". ...
884 views

### How to convert binary float to decimal float

I need to convert binary float to decimal float in Mathematica, ideally between any two bases. FromDigits["1.111111", 2] does not work.
330 views

### Solving an ODE numerically

I really appreciate it if anyone helps me with this: How can I solve this ODE and plot the answer for $x$ on $[0.6,5]$:  \begin{align*} -2xy'[x] = y''[x]+ 47.21 (-.0025 x^6 & + ...
286 views

### Retrieving PlotRange form BarChart

Consider the following data: data1={73.9377, 54.4122, 53.0826, 24.1936}; data2={76.828, 49.1673, 45.7883, 18.9015}; I defined my own BarChart as follows: ...
299 views

### Can SetDelayed (:=) be compiled?

Is it possible to put an If statement as below within a compile (see below)? I received a warning about SetDelayed. ...
297 views

### Explanation on why Compile statement works only if input and output sizes work

I found the following code: Compile[{{m, _Real, 2}}, Fourier[m]][Table[N[i - j], {i, 4}, {j, 4}]] which doesn't work correctly. But the following was posted as a ...
621 views

### Changing variables algebraically

Suppose one has two functions, $y(x)$ and $z(x)$, and one seeks to obtain $y(z)$ by substituting $x(z)$ into $y(x)$. Can this be done in a single step? Or must $z(x)$ first be inverted independently? ...
303 views

### Local variables

I'm trying to use Modules together with functions. tmp2 = x^2 + 1; f[y_] := Module[{x = 1}, Evaluate[y tmp2]] This works when ...

15 30 50 per page