Questions about the use of built-in Mathematica functions, including pure functions.

learn more… | top users | synonyms

3
votes
2answers
107 views

Evaluating Functions on Zero Sets (of other functions)

I have a highly non-trivial function, call it $f(x,y)$, in which I want to look at its zero set in the $(x,y)$ plane, and plot/evaluate a different function $g$ precisely along this zero set. I have ...
3
votes
2answers
121 views

Replacing multiplication of matrix elements by application of these elements as functions

I want to realize the following idea in Mathematica. I've got a matrix {{a,b},{c,d}} which is multiplied to a vector {h,k} ...
0
votes
0answers
34 views

ApartSquareFree function

I have a doubt concerning the ApartSquareFree function in Mathematica. Roughly speaking, it is supposed to compute the partial fraction decomposition of a rational function $h/g$ with the denominators ...
1
vote
0answers
35 views

Which the functions of parameters can use Span [closed]

As I know,ImageValue,PixelValue,ReplaceImageValue,...
8
votes
1answer
111 views

What is ExpectationE and what does it do?

I just found the symbol ExpectationE with autocomplete. Rendered the symbol is Searching the documentation and the internet leads to nothing. Does somebody ...
3
votes
1answer
70 views

Extended AutoCorrelation Function

Is there a function in Mathematica capable of computing the sample Extended AutoCorrelation Function (EACF)? I know that there's a package in R that does this. I was trying to avoid to having to ...
2
votes
1answer
67 views

ListPlot of auto-correlation function pushes data 1 lag

I'm trying to plot a graph of a sample autocorrelation function at different lags. The code I'm using is ...
1
vote
0answers
37 views

Getting a list of function definition parameter values [closed]

If I define a function over certain values: f[0] = 1 f[1] = 2 f[2] = 3 How do I get the list of parameter values that it's been defined on? ...
-1
votes
1answer
66 views

Plotting a function of another function

Edit: So I have several functions which come from other functions. For example: ...
1
vote
2answers
66 views

Selecting points in list that are inside a contour [duplicate]

I have a list of points which form a closed (connected) contour or path in two dimensions. I would like to get all points from a second list which satisfy the requirement that they are inside the ...
-1
votes
1answer
85 views

How can i 2d-plot Cobb-Douglas function?

can I plot Cobb-Douglas function in 2D without using ContourPlot? I have this function: u[x1_, x2_] := Log[x1] + 2*Log[x2]; and now I plot it using: ...
0
votes
0answers
69 views

Plotting function described by other functions!

I want to plot and manipulate my VS function which comes from the other functions above it. So, what should I use in order to draw my function considering that it is described by other functions. I ...
1
vote
4answers
140 views

Implicitly inverting a function from numerical solution [closed]

I have the following piecewise continuous function: ...
10
votes
1answer
117 views

Definition of Mod and Quotient with complex arguments

How are Mod and Quotient defined for three real/complex arguments? I wasn't able to find the definition. My main surprise so ...
1
vote
0answers
54 views

How to avoid tranfer the array as a parameter [closed]

I have following array: data = {x^2, 2*x^2, x^3}; And I must send it to the following function: ...
3
votes
1answer
70 views

Pareto optimal fronts using internal function?

Reading this question: How do I estimate the Pareto front in my multiobjective optimization problem? I found @Daniel Lichtbau's interesting answer. Yet I don't know how such an "internal function" ...
1
vote
1answer
110 views

Evaluate pure function through round brackets

In have some matrices of pure functions or numbers which I multiply by other matrices or vectors. I would like the functions to be evaluated in the result, but all that I get is something like this: <...
0
votes
0answers
28 views

PolynomialExtendedGCD in 2 variables

Consider a field $R$ and the ring $A=R[y]$. Consider two polynomials $g,h\in A[x]$. I want to obtain $d=\gcd(g,h)\in A[x]$ and two polynomials $s,t\in A[x]$ satisfying the Bézout relation: $sg+th=d$. ...
15
votes
1answer
135 views

Is it better to completely forget about the existence of PowersRepresentations?

I noticed that in several cases the performance of PowersRepresentations is hugely worse than that of IntegerPartitions. (Mma 10....
5
votes
0answers
138 views

Is there an internal logic behind short form symbols, such as @ (Prefix), @@ (Apply), /@ (Map), /. (ReplaceAll) [closed]

To me, function names (such as Apply and Map) seem more intuitive than their symbols (e.g. @@...
2
votes
2answers
58 views

Substituting within a function definition that includes Simplify

I would like to define a function like myfunc[f_] := Simplify[(f/g)] where g will be substituted/replaced with the current value of g at the time of definition. ...
3
votes
1answer
68 views

Checking if input is a function

I would like to write a program to find the leading coefficient of a given polynomial. (Sounds easy, right?) I'd like to be able to handle the format x^2-x+7 (with ...
3
votes
3answers
181 views

Return a sentence with numerical values

I have the following function: example[a_, b_] := Module[{c}, c = a + b; Return["The solution is c"] ] I would like to know how to return that ...
6
votes
3answers
149 views

What function superseded SpaceForm?

In older versions of Mathematica you could use SpaceForm to leave a certain amount of spaces when writing to a file. For example, if we have the following data: <...
10
votes
1answer
174 views

Core functions or operations that every aspiring Mathematica programmer should know? [duplicate]

I am aware that there are common yet very powerful operations like Map, Thread, Apply, ...
6
votes
2answers
314 views

What does empty {} mean in Module? [duplicate]

I have a question. I would like to know what an empty list ({}) means when used in Module[] as the code below shows? Why has a ...
0
votes
1answer
57 views

Partial derivative of function of two variables

This question is not enlightening nor is it difficult. But some part of my notation or how I have defined my functions is messing up the D[f,x] function. ...
1
vote
1answer
58 views

Mathematica Empty Plot FourierSinSeries function

I'm trying to get a plot of different order Fourier series of the function x-1, why does Mathematica give me an empty plot? ...
3
votes
1answer
70 views

Calling results of applying f to expr inside NestList

Being new to Mathematica, I try to follow the suggestions of using NestList, Map, Table ...
2
votes
2answers
43 views

Better alternative to Hold/ReleaseHold for postfix application of Monitor

Trying to Monitor a process using the postfix notation, as in Table[Pause[n/10], {n, 5}] // Monitor[#, n] & fails: the ...
6
votes
1answer
71 views

Custom operator form for system functions?

There are some functions for which an operator form would make sense but isn't implemented. For example, I'd like to make this work: RandomSample[3] @ Range[10] ...
-2
votes
1answer
72 views

Plotting 3-dimensional graphs [duplicate]

I just started Calculus 3 and I thought it would be useful to see images of functions to get used to the transition of visualizing in 3-dimensions. I was wondering how one would go about plotting a ...
-1
votes
1answer
58 views
5
votes
2answers
172 views

Get envelope of a set of functions?

I'm new with mathematica and I'm trying to solve a problem. I have a set of functions in the same variable. Let's say the domain is [0,2]. I would like to get an ordered list of the functions ...
3
votes
1answer
55 views

Undocumented “Output” alignment argument to “Column?”

In this SE question, Inheriting Stylesheets when using CreateDocument, I noticed the literal string argument "Output" to Column. ...
0
votes
0answers
37 views

Graphing/Plotting multivariate profit function with inequalities

I have the following profit function which I would like to 3Dplot in Mathemathica: Profit = (8c^2-16c*s-10c-4s-3)/(32s+16) , where ...
0
votes
0answers
93 views

Impose a boundary condition to a function

Background I am trying to impose a boundary condition on a function of two variables $u(x_1,x_2)$. The boundary condition is: $u(x_1,0)=A\cos(\omega x_1)$. The same function in mathematica $u(x_1,0)$...
0
votes
0answers
48 views

How to calculate a continuous function once and access values later?

I have a function that involves a numerical calculation: h[v_]:=NIntegrate[f[x]*Log[p[x, v]], {x, -Infinity, Infinity}] I need to visualize how well a bunch of ...
3
votes
2answers
70 views

Calculate Cumulative Mean and Standard Deviation of a list without FOR loops [duplicate]

I have a simple list mylist={x_1,x_2,...,x_N};. Now I want to map a function over this list, e.g. the Mean and StandardDeviation functions, so that it will give me ...
10
votes
0answers
118 views

Possible Bug in LinearSolveFunction with Sparse Vectors

Bug introduced in 5.0 and persists through 10.4.1 LinearSolveFunction is new in 5.0 Consider the following set of equations and corresponding variables: ...
0
votes
3answers
80 views

Write complex number in terms of absolute value and phase

I have a long vector and some of the values (19 out of 64) are complex. I got them using the Mathematica Rationalize function, so the complex ones are written in the a+bi form. Is there a function I ...
3
votes
0answers
34 views
1
vote
2answers
103 views

n fold convolution of a function via a recursion function

I wanted to write a recursion function to calculate the n-th convolution of a function f[x_]. I wrote the function ...
2
votes
1answer
148 views

Creating a function takes a list and dynamically modifies that list [duplicate]

I'm trying to create a function that uses a dynamic locatorpane to populate a list with the coordinates of user defined locators (added by alt+clicking). This code works fine: ...
0
votes
0answers
56 views

break down the function

I am using Series function, but I found that it cost too much time. Since the Series function is Taylor expansion and I only need first order, I want to break down the code, so I can make it faster <...
0
votes
1answer
57 views

Why my Function Has no Output Plot?

Below is my commands on a mathematica script to plot a function. In order to see why the function has issue to be plotted, I have tried to plot the intermediate functions one-by-one. It seems that my ...
1
vote
1answer
67 views

How to extract all necessarily code for a function?

Many times when someone pastes a piece of code into SE there are missing values and symbols that the user left out. To prevent this I'm looking for a function that uproots other functions (extract ...
1
vote
0answers
49 views

Is there any way to see a kernel function's code? [closed]

I was using the extremely useful function PrintDefinitions from the GeneralUtilities package and I encountered this: ...
4
votes
1answer
79 views

How to pass a pair of values to Table function?

I define a function like this: ϕ[t_,ϕ0_,ϕ1_]:=ϕ0+ϕ1/ArcSin[0.97] ArcSin[0.97 Sin[2Pi f(t-0.25/f)]]/.f->30 which generate: $$ \phi (t)=0.754586 \times \...
0
votes
1answer
57 views

Transform a variable's exponent from an exact rational to an inexact decimal

here is a little problem I could not find a solution for. I have a variable with an exponent represented as a fraction, for example, var = a^(39/106) Now I ...