All Questions

Filter by
Sorted by
Tagged with
3
votes
2answers
68 views

Fixed point of a vector

It seems to me that FixedPoint is designed to work with a particular value, but what if we want it to operate on a vector instead? I start with an nxn matrix mat and the function: ...
0
votes
0answers
23 views

Clear assigned y'[x] from memory [duplicate]

If I, by mistake, write Mathematica assigns $y'(x)=y(x)/5$ and I don't know how to clear that from memory (I had to restart Mathematica). ...
1
vote
0answers
38 views

Clearing ::usage message

After having assigned the usage message to f using ClearAll@f; f::usage=ToString@RandomInteger@{10^10,10^11}; the ...
6
votes
2answers
80 views

Assert no unevaluated function applications

Background Suppose I have begun a fresh kernel session, and I have defined the following function alone: F[x_, y_] := x + y; One expected use of ...
2
votes
1answer
53 views

Updating the name of nb file after closing/running it

Suppose I have a nb file named as 240119.nb [date of today]. Now If tomorrow I open it and do something, then upon closing it, It should be renamed automatically as ...
7
votes
4answers
130 views

How to modify a string of symbols based on the positions of $1$'s in a list of Booleans?

Given a list of Booleans: exampleInput = {1, 1, 0, 1, 0, 0, 1, 0}; and given the string: ...
2
votes
1answer
107 views

list sorting task

I am trying to understand how to sort by multiple columns in Mathematica. Here is a simple data set consisting of results of sports matches. Each element represents a game, and contains fields for ...
0
votes
2answers
101 views

How can I decompose polynomials in a certain way?

I' ve learned that the following examples can be used to decompose a factor in this way ...
1
vote
0answers
43 views

Persistence diagram

Is there an easy way to get a persistence diagram of given planar points? For example the following points: ...
3
votes
3answers
93 views

how can I calculate $a_{n+3}=a_n+a_{n+1}+a_{n+2}$?

recently I need to calculate this: $a(n+1)=((a(n-2)+a(n-1)+a(n)) \bmod 10000)$ and get $a(20000000)$ (for example). I know RecurrenceTable,but ...
1
vote
1answer
38 views

How can I give different colors to each ListLinePlot combined with Show[]

I tried to assign different colors for each ListLinePlot combined with Show, but none of the things I tried with ...
0
votes
1answer
40 views

How do I restrict the domain over which an equation is solved? [closed]

I tried to use the Solve function to find all solutions to $\sin x = \cos(2x)$ in the interval [0, 2π). I evaluated ...
0
votes
0answers
45 views

Function returns weird value [closed]

When I evaluate a self-defined function ...
8
votes
3answers
335 views

How can I get all 4 × 4 submatrices of an n × n matrix?

I have a square matrix, I need to extract all possible combinations of 4 × 4 submatrices, where $n > 4$. For example in the case of a 6 × 6 matrix, there are 15 4 × 4 submatrices. I need the list ...
3
votes
2answers
86 views

Using Map to extract elements of a list

I am given this problem. ...
1
vote
0answers
37 views

Mathematica Plot failed to visualize very acute changes [closed]

I am plotting a variable evolution with the results calculated by NDSolve. It reduced from 1.0 to 0.9 in the first 0.0001 seconds, while I want to plot this variable from 0 to 800 seconds. However, ...
3
votes
1answer
30 views

How to get KernelID in from KernelObject?

In a nutshell, how can I get this number: I'm having trouble because $KernelID isn't a function and the FullForm is this crazy thing: Motivation: After you call ...
1
vote
1answer
48 views

Controlling range of ListLogLogPlot

I'm having a problem where the following animation jumps around despite having PlotRange set. I don't have this problem with ...
0
votes
2answers
63 views

How can I index a function with the type of dataset used

I have the following code which serves my purpose for a single matrix input. For one or two matrices, the operation can be done manually, but I have 65 matrices and ...
0
votes
1answer
46 views

Plotting NMinimize function

I want to plot the following NMinimize function: I used GGPlot = Plot[GG[DM], {DM, 0.02, 10}, PlotRange -> All] But I get nothing! My code is ...
0
votes
1answer
56 views

Integrate[x Tan[x], {x, -1, 1}] with NDSolve [closed]

I am trying to solve with NSolve Integrate[x Tan[x], {x, -1, 1}] and get the numeric value. ...
3
votes
0answers
33 views

Mathematica file corrupted with the syntax error “Spacer[{0., 0.}], Selectable -> False”

My Mathematica file is corrupted. The error says There was a syntax error on line 34457 in the file: xxx.nb. The error was:Spacer[{0., 0.}], Selectable -> False ...
0
votes
0answers
26 views

Finding a Laurent polynomial that behaves at a pole like a given function [migrated]

I need to find a polynomial $P$ such that $P(1/x)$ behaves like given function $f(x)$ at zero (their difference vanishes), even if $f(x)$ has a pole at $0$ or unknown order. P.S. I need to find a ...
0
votes
0answers
27 views

Optimal way to approximate initial condition for PDE?

I have a Fokker-Planck PDE \begin{align} \frac{\partial p}{\partial L}(L,\eta) = \eta^2\frac{\partial^2 p}{\partial\eta^2}(L,\eta) +(1-2\eta)\frac{\partial p}{\partial\eta}(L,\eta)+\frac{2(\eta-1)}{\...
5
votes
0answers
37 views

Plotting a NumericQ-protected function with the attribute HoldAll fails

This works: ClearAll[f1]; f1[x_] /; NumericQ[x] := x; Plot[f1[x]^2, {x, 0, 5}] This does not: ...
2
votes
1answer
93 views

Fast way to the Taylor series expansion coefficients of multivariable function?

Is there a fast method to get the coefficients of Taylor series expansion of function $f(x_1,x_2,...,x_d)$ with maximal summed partial derivative up to $n$, where $d,n$ can be relatively large (for ...
0
votes
0answers
43 views

My Mathematica 12 does not show outputs [closed]

It is really embarrassing to ask such a question, but my mathematica 12 is not showing any outputs. In my notebook, I don't have any "input[n]=" or "output[n]=" tags, and there are only plain text. I ...
0
votes
1answer
55 views

ContourPlot with two parameters

I would like to plot a contour diagram of a function: ContourPlot[1/Sin[q \[Phi]], {q, 30, 100}, {q*\[Phi], Pi/300, Pi/200}] such that in the x-axis is plotted q,...
1
vote
0answers
30 views

Toolbars/Docked cells in paclets (global or stylesheet related)

I'm looking for an efficient way to define and set toolbars/docked cells for paclets. I know about TextResources folder, but it seems that one needs to put there definitions in terms of box ...
1
vote
1answer
69 views

Issue with NMaxValue Constrained to an ImplicitRegion

I am trying to find the maximum (and minimum) value of an interpolated function constrained to an ImplictRegion with a (partly) curved boundary. I have followed the documentation carefully and tried ...
3
votes
1answer
204 views

While loop in a function

f[n_] := ( While[n < 10, n = n + 1]; n ) I am trying to learn mathematica on my own. I am trying to write a function that contains a while loop, but I ...
0
votes
2answers
52 views

Select a number in a list

here is my question. I have a range of parameters spanning in a given range, a={1,50},b={100,200} and c={300,500}. For every set of parameters I have an indexed vector like this (for a given set): <...
1
vote
1answer
115 views

Wrong definition of auto-correlation function(ACF)

Consider $X$ to be a random variate with defined expectation $\mu$ and finite variance $\sigma^2$ . Consider a ton of points $X_1,X_2,..X_n$ generated via some process. The points need not be all ...
0
votes
0answers
28 views

How can I make plasma colorfunction for my density plot [duplicate]

I want to create a density plot in mathemtica and I want to use "Plasma" colormap which is given here (like Yellow corresponds to 0 and Purple corresponds to 1) https://image.slidesharecdn.com/...
0
votes
1answer
39 views

Understanding and solving a problem with FindFit

I have a set of data which I give here ...
-1
votes
0answers
32 views

What's the use of TagSet [duplicate]

I see this function definition in the file(galois.m), but I don't know how it works. ...
4
votes
3answers
54 views

Manipulate two graphs with one parameter

This question is related to a previous question Create a slider to illustrate Fubini theorem. Thank to the help of @kglr, now I can create sliders to control the slice. ...
2
votes
2answers
75 views

Usage and meaning of “ProbabilityHistogram”

When doing a classification one can determine the ClassifierMeasurements to get Information about the classifier. I now wanted to get a histogram of the computed probabilities for a classifier. Maybe ...
0
votes
0answers
29 views

How to modify some parts of a contour-plot?

I am using this ContourPlot ...
1
vote
2answers
45 views

Plotting incorrectly [closed]

When I write: Plot[E^x-3x, {x, -10, 10}] I have this as an output: However, the graph should look like this: Why is there this discrepancy?
5
votes
1answer
156 views

Where to get the detailed code of MMA for grid mesh

I know DelaunayMesh can triangulate the specified area, but I can't see the code and partition idea of this built-in function. I want to know how to get the source ...
1
vote
0answers
46 views

WordCloud Not Enough Memory Available Error

I'm having issues with WordCloud giving me the error Not enough memory available to compute the word cloud. This happens even on ...
1
vote
0answers
67 views

NDSolve issue, potential singularity or stiff system

I have the following parameters, equations, and NDSolve solution set up as such: ...
4
votes
1answer
111 views

Can bounding box coordinates be retrieved for words in a WordCloud?

The documentation shows how Mathematica can attach behavior to words in WordClouds, but I couldn't find anything on retrieving the list of bounding box coordinates. Is it available to the user? __ I'...
4
votes
1answer
79 views

Create a slider to illustrate Fubini theorem

I would like to illustrate the Fubini theorem in Calculus like the following picture (taken from this page): This is what I tried: ...
1
vote
0answers
49 views

Problems with a multidimensional principal value numerical integration

Multidimensional Principal Value Computation Hi all, I've been trying to work out a type of integral for... months? Years? I've scoured the documentation here, and tried several of the tips in other ...
0
votes
0answers
35 views

How to compute Max function of the following form:

I knew that in Mathematica, the "Max" function yields the largest element of any of the lists, for example, Max[x,y,z,....]. How do I implement this function with Mathematica? and what does this ...
1
vote
1answer
51 views

Vertically resize grid item to fill row height

I am trying to find a way to have an item in a grid cell that always fill the available vertical space enforced by the remaining items (without enforcing any row height itself). One of my (many) ...
2
votes
0answers
29 views

Contraction of tensors in chart (xCoba)

I have to do some calculations on modified gravity in xAct. The question is how to construct tensors, made of other tensors with contraction in particular chart. Without chart it can be done with <...
1
vote
0answers
32 views

How to smoothly zoom into GeoGraphics?

I was reading this article about the SpaceX launch and wanted to recreate the smooth map zoom: First of all, it doesn't know where the Kennedy Space Center is (what to do when that happens?): Using ...

15 30 50 per page