All Questions

Filter by
Sorted by
Tagged with
3 votes
1 answer
58 views

Checkbox alternating between first and third state of appearance

When clicking on the first checkbox its appearance alternate between first and second states. When clicking on any of the three checkboxes in the row they alternate between three states of appearance. ...
2 votes
0 answers
28 views

CreateDialog and GraphicsArray

I think I have hit on a true bug in the Mathematica Front End: If I define plotFunc[] := Print[GraphicsGrid[{{Plot[x^2, {x, 0, 1}], Plot[x^3, {x, 0, 1}]}}]]; I can ...
1 vote
0 answers
27 views

Changing mouse over grid behavior

How to achieve that mouse over Grid is always an arrow like we see on first image (when mouse is over an item of the grid) and never the the shape we see in the ...
5 votes
2 answers
112 views

Converting between currencies using a pair of currency codes

Mathematica can convert currencies using real time data: CurrencyConvert[Quantity[13.25, "USDollars"], "Euros"] which gives €10.8 Can I do ...
1 vote
1 answer
53 views

Defining a symbolic block matrix

I'm a total beginner in Mathematica and I have been struggling with defining the following symbolic matrix with entries in $\mathbb{Z}_2$ Here, $\mathbb{1}_{m_i}$ and $\mathbb{0}_{m_i}$ stand for the ...
0 votes
0 answers
37 views

Manipulate not showing despite Plot working fine

Heyhey I am trying to solve a differential equation for the time evolution of a probability distribution. It solves just fine using NDSolveValue and I am able to plot the solution for specific times, ...
2 votes
1 answer
69 views

Find disjoint subsets and their union is {1...9}

I have such a list sets = Select[IntegerDigits /@ (Range[Floor@Sqrt@987654321]^2), DuplicateFreeQ@# && FreeQ[#, 0] &] I want to pick all subsets of ...
6 votes
1 answer
141 views

How do I couple an 1D PDE to a 2D Laplace equation?

Recently I've come across the following system governing the spreading of an evaporating droplet. The height of the droplet $h$ is defined by the following equation $$\frac{\partial h}{\partial t}=-\...
9 votes
1 answer
280 views

Schrödinger equation for the Morse potential (DEigensystem)

I have tried to solve the Schrödinger equation for the Morse potential using Mathematica. I am using Mathematica 12, and I have written the following code: ...
0 votes
0 answers
40 views

How to make the AxisLabel move in a 3D plot [duplicate]

I have a question related to the 3DPlot Labels. I have this way to make a plot and I will want the plot to have rearranging labels when I rotate the plot around to maybe get a better view of it: ...
0 votes
0 answers
68 views

ContourIntegrate not works [closed]

https://reference.wolfram.com/language/ref/ContourIntegrate.html ContourIntegrate[1/z, z [Element] Circle[]] Out[174]=ContourIntegrate[1/z, z [Element] Circle[{0, 0}]] Why doesn't Contourintegrate ...
0 votes
0 answers
33 views

How to symbolize code for ladder operators

As suggested in this answer, I am considering symbolizing the function "NonCommutativeMultiplyNew" from the following code: ...
9 votes
3 answers
1k views

Taxicab Geometry

According to taxicab geometry, there are 1226 possible paths from A(2,5) to B(7,9), all with a distance of 9 units, |2-7|+|9-5|=9. I wanted to write a code where I could be obtaining the plots of some ...
8 votes
5 answers
513 views

Using DeleteCases to delete vectors with particular index as 0

Assume I have a set of vectors set = {{0,1,1,0,1}, {1,0,1,1,1}, {1,1,1,1,0},{1,0,0,1,0}}. I want to delete the vectors which have the last entry as 0. In the ...
8 votes
6 answers
297 views

Split matrix by all-zero columns

Below is my input: mat = {{0, 0, 0, 0, 0, 1}, {1, 0, 0, 1, 0, 1}, {0, 1, 0, 0, 0, 0}, {0, 0, 0, 0, 0, 1}, {1, 1, 0, 1, 0, 0}, {0, 0, 0, 1, 0, 1}}; $\quad\...
0 votes
1 answer
33 views

Preserving the font size in exporting images

I am trying to make a video by generating many images of a process, exporting them to the disk by the Export command in the PNG format, and finally making a video with FFmpeg. My images have a title ...
0 votes
1 answer
48 views

Trying to use NIntegrate and my code works intermittently - Throws one error consistently, but only gives me a partial result [closed]

I'm trying to do some calculations/simulations of pulse autocorrelations of non-integer orders and when I try to use NIntegrate it only works intermittently, and when it does work it only gives me a ...
5 votes
2 answers
91 views

How to most responsively manipulate time intervals in ParametricPlot?

I often met with the case where I want to show the past trajectory of a object. A way of demonstrating this is to plot the trajectory using ParametricPlot, and then ...
10 votes
7 answers
2k views

Filtering elements from a list

Suppose that I have a list {{{2, 1}, {4, 3}, {2, 4}}, {{2, 1}, {4, 3}, {3, 1}}, {{2, 1}, {2, 4}, {3, 1}}, {{4, 3}, {2, 4}, {1, 2}}} I want to make a new list ...
2 votes
5 answers
589 views

Delete sublists containing strings

I have a list with several sublists containing either strings or integers. I'd like to delete all lists with strings. The following list: ...
11 votes
6 answers
599 views

How to replace selected elements of a list of rules with another unbalanced list of rules

I have two lists of rules: ...
8 votes
5 answers
637 views

Colorbar to illustrate the change of a specific parameter

I have plotted a sine function where the period is varied. I have included my code below. ...
1 vote
2 answers
77 views

How to change the sampling period of discrete time model?

Mathematica Version 14.0 on Win 10. This is a problem I am having with a much more complicated notebook. I crafted the simple example below for this question. If I begin with an expression in the s-...
4 votes
1 answer
283 views

How do you ask someone to input the values of a matrix?

I'm trying to set up code that basically asks the user to input the values of a matrix with a certain key size. I want them to first enter the keysize and then ask for all of the entries necessary to ...
1 vote
1 answer
90 views

What's the difference between FourierSinCoefficient and FourierSinSeries in in terms of results?

Let's assume having defined a sawtooth: saw[t_] := 2*(SawtoothWave[t + 0.5] - 0.5) Now, we'd like to compute sine fourier coefficients for that sawtooth. We may do ...
1 vote
1 answer
97 views

How to quickly sample from the following distributions

Consider the following distributions: ...
2 votes
0 answers
31 views

How can I have a dynamic number of InputForms that grows as I add to it?

I'm trying to write a program where it starts with one input field, and if I fill out that input field, then another input field gets added below the first one and if I fill that one out another ...
0 votes
1 answer
63 views

Simplification of quantum ladder operators (ideally using Using NCAlgebra)

I want to do math that involves a series of ladder operators. In the past I've tried to get it working with a 20 year old Mathematica package. But my feeling is that this is a very unused package and ...
0 votes
1 answer
85 views

Error on RecurrenceTable with two variables [closed]

I am trying to simulate a second order filter unit step response with the RecurrenceTable instruction in Mathematica. There's a problem with the second-order ...
4 votes
2 answers
108 views

Questions About the FunctionExpand Function

Today, while helping someone solve a problem, I encountered an issue with the Abs function in their expression. I needed to derive the ...
3 votes
1 answer
87 views

How to Convert WLSymbolFactory to Python String?

I'm trying to simulate with python and Mathematica, Python need to generate and save some pictures to the directory of current mma notebook, I know the function that ...
3 votes
1 answer
65 views

Interpretation function not working properly with Graphics [closed]

The Interpretation function does not seem to be working properly with Graphics on my computer (MacOS 14.2.1, Mathematica 14.0.0.0). Instead of returning what it should be interpreted as, it returns ...
-1 votes
0 answers
30 views

Higher moments dominated by mean and variance [closed]

Let {$X_{k}$} be i.i.d variables, $\mathbb{E}(X_{k})=0$,$Var(X_k)=1$. Fix $u > 0$, denote $\widetilde{X}_{k}=X_{k}\mathbb{I}_{|X_{k}|>u}-m(u)$, where $m(u)=\mathbb{E}(X_{k}\mathbb{I}_{|X_{k}|>...
0 votes
0 answers
34 views

Ising Model Simulation Increase Efficiency

I implemented a 2d simulation of Ising Model for zero external magnetic field. Below you can find the function I wrote to calculate the energy (periodic conditions) ...
2 votes
2 answers
665 views

Set of flat curves with filling in 3D plot

I'm trying to draw 3D plot from my experimental points in the way shown at the figure below: I tried to use ListPointPlot3D for that, but obviously there is no option Joined as in ListPlot. ...
0 votes
0 answers
16 views

ParallelTable: an unknown box name (TerminatedEvaluation) was sent as the box form for the expression [duplicate]

This seems to be a bug? The example code for MMA v.13.0 is: ...
1 vote
2 answers
80 views

How to find number of integral solutions of the equation $\log _3(x+3 y)+x^2+3 y^2+4 x y-x-y=0$?

I am trying to find number of integral solutions of the equation $\log _3(x+3 y)+x^2+3 y^2+4 x y-x-y=0$ here $x$, $y$ are integer number $x\in [-2024, 2024]$ and $x + y >0$. I tried ...
2 votes
1 answer
76 views

NIntegrate underestimate the area under the graph [closed]

I want to find the area under this graph, I used NIntegrate for this purpose and here is my script, ...
6 votes
4 answers
838 views

LabelingFunction won't show all the labels

I am trying to plot a ListPlot where each point has a label. Unfortunately Mathematica seems to decide that is a label is too large, it will not show it. I would ...
0 votes
0 answers
34 views

(xAct) AllContractions with sum of terms

I'm doing some GR calculations using xAct package. In order to find all dimensional-dependent-identities (DDIs), mathematica has to apply the ...
2 votes
1 answer
56 views

Solving multivariable equation after setting partial derivative to zero

I have a real-valued function of four variables, namely $L[\phi, m0, m1, m2]$. I am interested in taking the partial derivative $\partial_{\phi}L$ thereof and setting the partial derivative to zero, ...
4 votes
4 answers
124 views

Create a new table by deleting some similar rows, provided that their outputs are collected

How to delete duplicate rows, collect their outputs in general, and create a new table. The figure below shows the idea required to create the new table The idea is that if the rows are similar in ...
4 votes
5 answers
228 views

List replacements

Sorry, for the broad title, didn't know how to best describe it. I have a list likes this: ...
6 votes
5 answers
346 views

Delete special part from a list using Mathematica

I have a list like this: {{-0.0019,1},{-0.0018,2},...,{0,11},{0.001,6},...} I need to make a new list that start from zero value. like this: ...
3 votes
6 answers
1k views

How to select some sublist in a list of list?

Hopping to be clear, I ask this question after some hour of unsucceeded work I have this list ...
16 votes
10 answers
2k views

What's the foo such that foo[{a, b, c}, 2] produces {a, a, b, b, c, c}?

I can define such a foo like this foo[list_List, n_Integer] := Join @@ Transpose@ConstantArray[list, n] foo[{3, {1, 4}, 1}, 3] ...
5 votes
7 answers
450 views

Flip sign of one variable in list

I have this list of x, y-pairs l={{x1, y1}, {x2, y2}, ...}. Now I need to flip the sign of the y values only before plotting. What is the easiest way to do this ...
6 votes
3 answers
288 views

Plot diagonal lattice path

I'd like to plot lattice paths like RUURUD where R is a step to the right, U is a step above ...
0 votes
0 answers
54 views

Numeric coefficients of a series/polynomial

In my work, i usually come across expressions of the form: $$\text{L3}=\frac{625 f_5^{30} q^4}{f_1^{31}}+\frac{24458 f_5^{24} q^3}{f_1^{25}}+\frac{25436 f_5^{18} q^2}{f_1^{19}}+\frac{25415 f_5^{12} q}{...
7 votes
5 answers
179 views

Deleting integers that are sandwiched between symbols

I have a list of symbols and integers: lis = {a, b, c, 1, d, e, 2, 3, f} I'd like to delete each integer that is preceded and succeeded by a symbol: ...

15 30 50 per page