All Questions

Filter by
Sorted by
Tagged with
-1
votes
0answers
10 views

Testing a condition to replace elements of amatrix

I want to write a code that checks each element of a given matrix C2 and in case they are't 0 or 1 , replaces them with 1. My code is so far as follows and the code ...
2
votes
0answers
10 views

NMinimize to ignore arguments for which function is complex valued

I'd like to minimize a pretty complicated function $f(x, y, z)$ with NMinimize, however for certain values of the arguments $f$ becomes complex valued, and my ...
1
vote
0answers
24 views

Reading product of same ByteArrays

I am handling a huge set of data and I am trying to optimize my code. I have very large expressions to expand and simplify and I've seen that converting the expressions to ByteArrays improves a lot ...
2
votes
1answer
24 views

Make an InterpolatingFunction periodic

Interpolation can make an InterpolatingFunction periodic with the option ...
2
votes
2answers
43 views

Curve Fitting Data using Polynomial

I have this Data set into Mathematica as such: ...
0
votes
0answers
18 views

Best way to get handle on the Ticks properties

There are a lot of questions already on Ticks. However I did not find a better way to handle ticks place, size etc. I have a simple example where I want have some ...
3
votes
2answers
23 views

How to efficiently check if a matrix is a Toeplitz Matrix

With ToeplitzMatrix we can create a Toeplitz matrix from a list of values. I have a question going in the opposite direction, namely, how to efficiently check if a ...
1
vote
1answer
15 views

Let NCAlgebra know that Tr[] commutes

I have an expression where there are terms like a ** (b*Tr[a ** b]) and I want to simplify it to something like ...
3
votes
0answers
32 views

How do I get built-in functions to use custom objects as if they were e.g. List?

(This is part 2 of my earlier question, Can I overload Part for specific heads (a la overloaded array subscripting)?, which was well-answered as asked.) Overview: My goal is to create a custom object -...
5
votes
1answer
40 views

How to ingest and analyze benchmark results posted at MSE?

How to ingest Mathematica / WL benchmark results posted at Mathematica StackExchange (MSE), like the ones posted here ? Assumptions: There are multiple answers with benchmarks posted The benchmark ...
0
votes
0answers
8 views

ToCTensor does not respect symmetry of tensor

If I try to convert a tensor object to a CTensor DefTensor[F[i, j], M, Antisymmetric[{i, j}]]; Fc = ToCTensor[F, {ch, ch}] The output is ...
0
votes
0answers
20 views

Find fit distribution of Normalized Histogram

I need to find a function to fit an histogram with "Probability" setting: Histogram[data,Automatic,"Probability"]. Thanks
2
votes
1answer
19 views

How can I let the length of a vector in VectorPlot be represented by it´s norm?

I would like to draw a vector field and let the magnitude of the vectors change over time (t) using the Manipulate function. The direction of the vectors will be static. ...
3
votes
2answers
44 views

Highlight elements in the list using pattern matching

Starting from the following list: list = {{a, b, c}, {d, e, f}, {g, h, i}, {b, c, d}, {c, a, m}, {c, d, n}}; I want to ...
0
votes
1answer
7 views

Contracting a Tensor with a CTensor in xAct

I'm trying to contract two tensors that I made in xAct to get a simple result. First I set up a Cartesian space ...
0
votes
0answers
21 views

Problem wiith If statements inside For loop

Consider If statement If[1 == 2, 1] which is false and so does not evaluate, and If statement If[2 == 2, 2] which is true ...
2
votes
1answer
22 views

Probability Generating Function(s)?

I'm very new to Mathematica and I have started to use it since I have been tackling some Physics related problems(I'm an engineer by training). Specifically, I'm dealing with Master Equations and one ...
2
votes
2answers
66 views

Solve for parameters so that a relation is always satisfied

Lets say I have a function parameterized by a number of variables. As a simple example $$F(x,y) = ax^2 +by^2-cxy+1$$ I want to find some set of values (doesnt really matter what they are) for the ...
0
votes
0answers
18 views

GridLines missing using SciDraw

Does anybody know how to include standard GridLines in SciDraw? I found this but it doesn´t really answer the question. Here my minimal example reproducing the problem: ...
0
votes
0answers
14 views

How to define a divergence-free vector or a traceless tensor in xAct?

I'm trying to implement a Friedmann-Lemaître-Robertson-Walker metric + a perturbation in a scalar-vector-tensor split in mathematica, using xAct. The S-V-T decomposition comes with some rules for the ...
0
votes
1answer
46 views

How can I make an FFT in Mathematica using data from a file? [closed]

I need to calculate the seismic moment of an earthquake data, but I don't know how the FFT is applied in some data, my data is a plain text that I must import it to Mathematica ...
0
votes
1answer
21 views

How to share multiple “tagged” functions (symbols) like f[a][b] in parallel kernels?

I would like to give some context: I need to analyse many data sets stored in files using different kind of analyses. To keep track I like to tag each results of my analysis for example like ...
3
votes
4answers
35 views

Double contraction between 2nd and 4th rank tensor

I would like to compute the double dot product between a 2nd and 4th rank tensor in mathematica $A_{kl}A_{ijkl}$ $if \, A_{kl}=\begin{pmatrix} 1& 0 & 0\\ 0 & 1 & 0\\ 0&0 & 1 \...
5
votes
1answer
72 views

Undefined Indexed Variable

I searched already a lot about indexed Variables, and it tends to be the most applicable way to use tensor notation. But I am having a hard time to solve for undefined indexed variables: Here my ...
1
vote
1answer
47 views

Plot the indices of the background Matrix instead of the calculated values

I wanna create a background 60*100 matrix and insert inside it the calculated values for example data={{1, 60.51}, {2, 24.5115}, {3, 9.92919}, {4, 4.02214}, {5, 1.6293}, {6, 0.66}}. So the rest ...
1
vote
0answers
18 views

Why does the InterpolationPointsSubdivision method fails to calculate this integral correctly?

Consider some dataset. I use the following code to interpolate it: ...
1
vote
0answers
33 views

LogPlot Fibonaccinumbers from n to m

I want to draw the Fibonaccinumbers from 16 -116. ...
5
votes
3answers
156 views

Plotting a normal curve over a histogram

I am teaching a basic introduction to normal curves, and the textbook introduces the topic with the idea of rolling five dice and recording the sum. Do this many times and create a histogram of the ...
2
votes
2answers
113 views

Change the color of sub-expression when the whole expression evaluates to a different expression

I found it's tricky to colorize a sub-expression of an expression that changes to a different expression when it is evaluated. For example, if I replace s with ...
0
votes
0answers
36 views

How to specify that symbolic expressions are real numbers in Mathematica? [closed]

I have the following complex expression ...
0
votes
0answers
22 views

Symbolic expression of group delay [closed]

So I'm trying to find the symbolic expression of the group delay of this complex function: TFilter=(K1 wp1^2)/(-w^2 + (i*w*wp1)/Q1 + wp1^2) My attempt was to first ...
1
vote
1answer
39 views

How do I find the maximum of a certain complex expression? [closed]

I have this expression: TFilter1 = -(7.5438*10^8/(6.34731*10^8 + 48270.2 s + s^2)) where s is a complex variable give by $s = ...
0
votes
1answer
38 views

How do I find the solution of a system of Diophantine equations in two variables? [closed]

If the first equation is 2x+y=152, and the second is x+2y=100, and it is a fact that both variables are whole numbers and x is larger than y, what is the value of x?
0
votes
1answer
34 views

Symmetric part of a 4th rank tensor in mathematica

I am quite new to Mathematica and would like to know how to compute the symmetric part of a 4th order tensor $A_{ijkl}$. Since there are 4 indices (i,j,k,l), we have 4!=24 permutations. The symmetric ...
2
votes
1answer
35 views

Group pattern using parenthesis

I have a very long list of data. Below is a simplified version data = {junk1, textHeader, moveTo, text, moveTo, text, junk2, textHeader, moveTo, text, junk3} I ...
1
vote
2answers
84 views

How can I evaluate a certain integral numerically?

The problem arises as value of $\gamma_0$ is very high (on the order of 10^13), whereupon $\exp (-\gamma_0\,h_a^2)$ is becoming very small and ultimately zero. Can anyone help me to evaluate this ...
9
votes
1answer
149 views

Finding astroids

An astroid is a particular mathematical curve: a hypocycloid with four cusps. Given a lot of data points I'm trying to fit such a curve to the data. As an astroid is also an algebraic curve of grade 6 ...
1
vote
1answer
46 views

How to set colors for the customize contours

I am trying to beautify a contour plot where I have a wide data range. But still I want to use a linear scale for axis. But due to large range of the data, the most of the contours are restricted to a ...
0
votes
0answers
24 views

spontaneously quitting kernel, assignment and packed arrays

I am having an issue where the kernel spontaneously quits, deep in a long code that I have used for quite some time without this issue. I've tracked it down to an assignment of the form: a[[All, All, ...
3
votes
1answer
90 views

Infinite summation giving weird results

We are searching in our group for closed forms of derivatives of hypergeometric functions. This leads to expressions like $\sum\limits_{m=2}^\infty \frac{z^m\Gamma[m-1/2]H_m}{2m^2\sqrt{\pi}\Gamma[m]}$ ...
0
votes
0answers
13 views

Can't plot derivative of Hankel function [duplicate]

I am trying to plot the first derivative of $H^{(1)}_3 (ix)$ with respect to its argument $ix$, where $H^{(1)}_3 (ix)$ is the Hankel function of the first kind with order $3$, $x \in \mathbb{R}$ is a ...
0
votes
0answers
40 views

Summation of all elements of list [closed]

Lets say I have below list of elements in which summation of all elements need to be done. ...
0
votes
2answers
42 views

How do I export a movie in AVI or Mov without altering the color and resolution?

Lossless movie export. How do I do that ? Or how do I export such that the color doesn't change. AVI makes changes the color and mov changes resolution and color. If you export a still image (in BMP ...
1
vote
1answer
60 views

How avoid to memorize 1 billion useless data

I am a newbie Mathematica user I wanted to know, using brute force, how many non empty triplets $\{A_1,A_2,A_3\}$ of subsets of $$AA=\{1,2,3,4,5,6,7,8,9,10\}$$ satisfy the conditions $A_1\cup A_2\cup ...
0
votes
1answer
45 views
3
votes
1answer
77 views

Export high resolution 3D graphics

There is a code for a revolution of Koch Snowflake I just want to export it as an obj file (or any other 3D format) ...
0
votes
0answers
25 views

How to get the coordinates of a Point [closed]

I have a point object, let's say A = Point[{Cos[2 Pi/5], Sin[2 Pi/5]}] . How do I get the $x$ and $y$ coordinates of the point in separate variables?
0
votes
1answer
28 views

Define commutator of operators, to do computations

I'm actually new to Mathematica I have been using sympy and sometimes cadabra to do calculations for a while though, I was wondering if there is an easy way to compute arbitrary expressions simplified ...
2
votes
3answers
302 views

How to use pipe operator in Mathematica?

t = Table[i1 + i2 i3, {i1, 2}, {i2, 3}, {i3, 2}] ArrayDepth[t] How to use "pipe operator" in Mathematica Version 11.0? In R, with library ...
0
votes
1answer
33 views

Invertion of an equation involving an integral

I am trying to solve the following equation numerically for $\mu$, but I'd like to keep $T$ and $n_e$ as parameters for easier plots. $$ n_e = \frac{1}{\pi^2}\int_0^\infty dp\, p^2\frac{\sinh \left(\...

15 30 50 per page
1
2 3 4 5
1473