0
votes
0answers
3 views

Using Do and While to make cluster array with two elements

I have assigned an array such: Ma = {{0.01, 1}, {0.09, 2}, {0.11, 1}, {0.19, 2}, {0.21, 1}, {0.29, 2}, {0.31, 1}, {0.39, 2}, {0.41, 1}, {0.49, 2}, {0.51, 1}, {0.59, 2}, {0.61, 1}, {0.69, 2}, ...
0
votes
0answers
11 views

Algorithm to construct all $0-1$ matrices of given order

I want to write a program. Input: A natural number $n$. Output: All possible 0-1 matrices of order $n$. Can you give me some ideas or algorithm for that? I need such matrices at least up to order ...
0
votes
0answers
12 views

Changing the $CloudBase variable

How can I change $CloudBase to some directory on localhost and successfully use it for CloudDeploy?
1
vote
1answer
51 views

Find a Fourier series from discrete data

I am trying to fit a Fourier cosine series to discrete data. I read through this, but I was not able to understand it. This data should be periodic with a period of $0.2 \textrm{m}$ and it is the ...
0
votes
0answers
23 views

Defined Function fails to Evaluate [on hold]

I apologize if this post is below quality, and please request more detail if necessary. I have been having this issue recently: I define a function as such: f[a_list, b_]:= ..... For a standard ...
0
votes
0answers
25 views

Calculate dependent probabilities [on hold]

Imagine that two raffles will happen, every raffle will reward 1 person. 10 people will participate. The first raffle will reward 1 person. The second raffle will reward another person, but the ...
0
votes
0answers
38 views

Compilable function with the functionality of SingularValueList

I'm doing something that involves finding the singular values of a lot of matrices. Basically I need to find singular values of $n$ matrices of dimension $n\times n$, where $n$ is as large as ...
3
votes
1answer
34 views

Bilateral ZTransform

Is there support for bilateral Z-transform in Mathematica, or a third-party package?
1
vote
1answer
30 views

Expand the plotting range [on hold]

When use the following command to plot a graph Plot[x^(1/3), {x, -1, 1}] Mathematica does not show the range [0, 1]. It ...
4
votes
2answers
51 views

How to make a notebook take action whenever a particular symbol is defined or redefined?

For teaching purposes, I want to create a Mathematica notebook that will "notice" when the user defines or redefines a variable or function of a particular name, so that it can check the value and ...
1
vote
0answers
29 views

Minimax for conditioned UnitStep functions

I made a simplified version of my problem, and I have now: ...
0
votes
0answers
37 views

being a function in a multiple steps and using syntax for being shortened

My desire is to access to a table with the bellow construction: Table[desired[t], {t, 0, 2, 0.1}] For achieve to desired[t] ...
0
votes
0answers
34 views

Mathlink returning wrong output

My code below shows the function I am putting into the kernel to compute mathskernel.Compute("NSolve[" + yaxisin + ", y]"); where ...
5
votes
0answers
72 views

Wrapping text around pasted graphic

I would like to use Mathematica to create all my documents for my high school math class. I cannot, however, find a way to copy and paste a diagram (let's say from Geogebra) and then place it where I ...
2
votes
1answer
37 views

Plot does not take range with OptionValue and PlotRange option

I am making a function that is to use Show to overlay a few plots of a function. I want the first Plot in ...
2
votes
2answers
41 views

How can I pass values to a NamedSlot in TemplateApply

str="``;`v`;`v`;``"; template=StringTemplate@str; TemplateApply[template,CharacterRange["A","Z"]] (*"A;;;D"*) I want to get the result as: ...
3
votes
0answers
59 views

Why Function is compiled?

Function isn't mentioned in the list of compilable function, but it can generally be compiled when it's formed by compilable functions, a simple example is: ...
1
vote
0answers
44 views

creation a table from a default module [on hold]

I have used of bisection method for finding the root of a function: ...
1
vote
0answers
31 views

Stopping NDSolver at time of error

I am using NDSolver and WhenEvent to solve a system of differential equations. I get this message: ...
3
votes
2answers
50 views

An conditional Sum of elements in Array

Consider we have: list = {{2, 3}, {3, 30}, {3, 2}, {4, 53}} and we want to compare the first elements and sum the second elements if first elements are similar ...
-2
votes
0answers
37 views

Graphs making on Mathematica by using HAM [on hold]

I'm working on HAM, on graphs making i encounter a problem over and over again that on even iteration it gives a graph of different shape and on odd iteration it gives totally different shape of ...
4
votes
3answers
54 views

Replace values in a list based on conditions

I have a list with negative and positive numbers list = {-1, -2, 1, 2} and I want to replace all negative values with 0 and all positive values with 1 ...
3
votes
0answers
42 views

First Plot misses the Show [on hold]

g4 = ContourPlot[Sin[x] Cos[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}] g5 = ContourPlot[Cos[x] Sin[y], {x, 0, 2 Pi}, {y, 0, 2 Pi}] Show[{g4, g5}, PlotRange -> All] How to ...
-3
votes
0answers
47 views

Find the tangent at a homogenous point to a curve [on hold]

I'm new to Mathematica. I want to find the tangent at the point $p=(6,5,1)$ to the following curve: ...
11
votes
3answers
482 views
1
vote
1answer
63 views

Matrix multiplication for higher dimensional matrices [duplicate]

I have a matrix like this (myb1): I would like to get the matrix multiplication of each of the submatrix to itself. For example the first 2x2 matrix $\begin{bmatrix}1 & 2\\1 & ...
0
votes
0answers
17 views

Time Series into List of Pairs? [on hold]

Mathematica's new update includes this handy dandy TimeSeries thing in which all Weather Data is automatically generated as. However, I need to manipulate this data in list form- How would i go about ...
1
vote
0answers
47 views

How to test for a non--zero rational function? [duplicate]

I want to test if a rational function in one variable is identically zero. I was surprised that just writing f==0 doesn't do it. I wrote the following code: ...
15
votes
1answer
216 views

Faster binary Hamming weight for big integers?

While working on an answer to Count the sequences in an array I found that DigitCount was the bottleneck in my code when used as ...
1
vote
1answer
56 views

LogPlot hangs but Plot does not

This is a bit involved example, but I have not been able to reproduce it in more simple cases. ...
2
votes
3answers
55 views

InterpolationOrder 2 or more in ListLogLinearPlot

I'm using the function ListLogLinearPlot, but the plot is to square, i would like to have InterpolationOrder 2, but there is not ...
3
votes
1answer
63 views

How do I color Riemann integral rectangles using conditionals?

I'm builind a function to visualize the Riemann Integration process to any function using rectangles. Everything is fine, except that I need the color of the rectangles to change if they're under the ...
2
votes
1answer
63 views

Expand a product of operators

Lets suppose I have a family of operators $f_i$, and unknown c-numbers $a,b,c$. I want to expand such products: $(f_1+f_2+c)(f_3+f_2+b)$ into $b c+b f_2+b f_1+c f_2+c f_3+f_2^2+f_1 f_2+f_2 f_3+f_1 ...
0
votes
0answers
26 views

ParametricNDSolve of differential equation with singularity

I have a differential equation I would like to solve with the ParametricNDSolve. However, the coefficients in the differential equation are singular at a certain value, so sometimes NDSolve crashes ...
0
votes
0answers
29 views

How can I import JSON object as a nested association? [duplicate]

Still seems difficult to get an understanding of a JSON object imported using ImportSting[str,"JSON"]. Is there anyway convert it to a dataset perhaps, where queries would be easier than the ...
0
votes
0answers
25 views

Exporting data in an output file from a Do-loop evaluation [duplicate]

I want to transfer the output of the following evaluation into a two-columned data file where the first column will be values for a and the second column will be ...
2
votes
1answer
58 views

How do I define a random variable involving Part?

I need to define a random variable that involves Part, but when I try, for example ...
2
votes
1answer
76 views

solve nonlinear equations with NDSolve

I am trying to solve a set of equations with NDSolve. one of them is mg*yg''[t] == NN[t] - kb*yg[t]^1 - cb*yg'[t], When the power of yg[t] is 1 the equations could ...
-2
votes
0answers
42 views

Multidimensional Interpolation with 3 independent Variables with modfied data set

I have four column data with first 3 column denoting x,y,z and fourth column energy. x variable is actually angle. Now I want to interpolate over all three indepdent variable (x,y.z) with ...
0
votes
0answers
25 views

Need help with solving inequality under assumptions

I seriously need help for my research. I need to solve an inequality with several assumptions. I tried many times with Reduce but it did not work out properly. Sometimes the results I get are simply ...
0
votes
2answers
77 views

Significantly different results between Mathematica and Wolfram Alpha with large radicals and small numbers [on hold]

I have some code which involves tiny numbers being put to the power of very large numbers. The function I'm looking at is $\varphi = \omega(T) \left(1 - (1 - \epsilon)^{n_{e}(T)} \right)$ when ...
0
votes
0answers
45 views

Is Eigensystem::eivin message a bug?

I noticed that in the question Request for clarification of Eigensystem::eivn message the error message Eigensystem::eivn: Incorrect number 2 of eigenvectors for eigenvalue ...
5
votes
5answers
160 views

How to write an operator that acts on pure function (to give another pure function)

I would like to write an operator oper that acts on a pure function f with an undetermined number of arguments, with the syntax ...
0
votes
0answers
18 views

CoordinateBoundsArray? [on hold]

I want to use CoordinateBoundsArray but Mathematica does not recognise it. Is it a specific package that I need to explicit include, or is this just due to my ...
8
votes
4answers
108 views

Cluster numbers into n partitions so that each partitions sum is closest to total/n

For example having data data = {16, 4, 17, 10, 15, 4, 4, 6, 7, 14, 9, 17, 27, 6, 1, 9, 0, 12, 20, 8, 0, 3, 4, 0, 3, 4} I want to cluster them int 4 partitions ...
5
votes
3answers
102 views

Finding the conditions for degenerate solutions to a cubic equation

I have a cubic equation (corresponding to the band structure of a physical system) given by w in the code below. ...
0
votes
2answers
43 views

Show a part of the output but be able to work further with the full output [on hold]

Is it possible to display a portion of the output without dropping the hidden data? For example, when I use Shallow, a part of the output is actually dropped.
0
votes
0answers
33 views

Vectors in Time vs Value line graph [on hold]

I have some data that varies with time and can be plotted on a line graph of values at irregular points in time. I'm trying to extract some trends from that graph and in doing so I want to treat the ...
1
vote
1answer
38 views

ListLinePlot partial filling

I use ListLinePlot to plot data: ...

15 30 50 per page