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

learn more… | top users | synonyms

1
vote
0answers
38 views

finding list by expresion [closed]

Well Im new to mathematica. I have list of x which contain {1,23,45,6,43}. And I get expression from g = Fit[t, {1, v, v^2}, v] how can apply list x to g to ...
5
votes
2answers
242 views

Symbolically Expanding One-Variable $q$-hypergeometric Series

In general, how do I get Mathematica to symbolically expand various infinite series to an arbitrary degree of accuracy? I deal with $q$-hypergeometric series quite frequently, and specifically want ...
3
votes
3answers
207 views

How to get exact coordinate of a point from a plot?

I am using BodePlot[] to plot the magnitude and phase of a function as below. BodePlot[1000/((1 + s/10^3)*(1 + s/10^6))] ...
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 ...
74
votes
3answers
3k views

Flatten command: matrix as second argument

One thing I could never wrap my head around is how Flatten works when provided with a matrix as the second argument, and the Mathematica help isn't particularly ...
2
votes
1answer
66 views

How to plot a function whose constant parameters have associated uncertainties in Mathematica 8.0?

Let's assume I want to plot the function $f(x)=a + bx+ cx^{2}$, where experimentally known values of parameters $a, b$ and, $c$ are as follows: $a=1.01 \pm 0.18$ $b=0.92 \pm 0.11$ $c=2.2 \pm 0.2$ ...
2
votes
1answer
65 views

Can I create a mouseover summary or documentation for a new function?

In Mathematica, when you hover any a built-in function, a small window with 2 symbols appears (as in the third paragraph of this reference page, see picture): clicking on the former one gives you a ...
4
votes
1answer
85 views

Trying to create an interactive plot (newbie here)

I'm new at Mathematica so please bear with me. I am trying to create an interactive plot that will end up looking like this: I want to input values for certain variables and then plot a curve. This ...
1
vote
2answers
48 views

FourierSeries command , for arbitrary period T?

ExptoTrig[FourierSeries[Piecewise[{{-Pi,-2Pi<x<=0},{Pi,0<x<=2Pi}}],x,3]] You can see, the function goes from $(-2\pi,2\pi]$ But Wolfram Alpha gives a ...
41
votes
5answers
1k views

Why is there no PositionFunction in Mathematica?

Too often I have seen the programs of inexperienced users greatly slowed by using Position in an iterative fashion, when far faster would have been to compute a ...
1
vote
3answers
257 views

Operations on transfer function model

Suppose I have a transfer function defined via TransferFunctionModel, e.g. tf == TransferFunctionModel[{{1/s}}, s]. How can I ...
1
vote
1answer
60 views

Defining functions as derivatives

I'm working on a model that requires a sum over a function that uses various coefficients. In order to make the sum easier to perform, I am trying to keep things general through the use of a ...
3
votes
1answer
152 views

Defining a matrix with elements acting as operators

This question is directly related with my previous one. I'll try to be more specific here. I have a matrix {{a[x],b},{c,d}}, where ...
-5
votes
1answer
57 views

What is this function aimed to do? [closed]

Table[Sum[tmatrix[[i, j]], {i, 1, 2}], {j, 1, 2}] apparently creates some sort of a table, and it evidently works on a matrix....although it is hard for me to understand what should it do beyond ...
-1
votes
1answer
72 views

Scan over regions of parameters

I have a function f which takes three arguments x, y and z: f[x_,y_,z_] := 2 x + 0.5 y + z ...
0
votes
1answer
531 views

Problem with FindRoot applied to functions

I am having difficulty with the error "is not a list of numbers with dimensions..." when using FindRoot (and other numerical routines in Mathematica) to solve equations numerically when the argument ...
1
vote
0answers
43 views

Is there any point to using a variable as a function parameter?

Normally one only sees patterns as function parameters: fun1[x_]:=x^2 Is there any point to using a variable in a function definition: ...
1
vote
2answers
118 views

Function does not execute commands and fails to evaluate [closed]

The code I am trying to execute: hh[x_, y_] := x + y; hh[{3, 4}] The expected output: 7 However, on output I get ...
3
votes
2answers
135 views

UI characteristic function [closed]

I have three given points: $\qquad $A$\qquad $(0; 5.9) $\qquad $B$\qquad $(18; 5.56) $\qquad $C$\qquad $(22.32; 0) I don't know how I can create a function like the one in the image below with ...
0
votes
1answer
52 views

How to create a function that can be evaluated for specific values [closed]

I have been trying to create a function to compute a field and perform operations with it, however when I try to define it I have used: ...
7
votes
1answer
109 views

Generalizing LongestCommonSequence to 3 or more arguments?

The function LongestCommonSequence finds a longest common subsequence between 2 lists. Apparently, this built-in function does not accept more than 2 arguments. How ...
0
votes
1answer
39 views

Selecting terms on only one variable from a multiple-variable expression

Say I have a polynomial like $x y^2+15x^2 y+x+3y+10$ and I want to obtain, say, only the coefficient in $x$ alone, namely a 1. Using ...
4
votes
1answer
1k views

How to take the derivative w.r.t. an arbitrary function?

EDIT: The answer posted by @Jens works for built-in functions only. However I'm starting to wonder if this is related to my Mathematica install somehow. I have version 7. Here is an example in the ...
1
vote
0answers
24 views

Help Compiling Vectors using Iterations

So I have a nice code that runs properly, which I include below but, in my naiveté, I'm having issues iterating my procedure. Simply put, I have a function of two real variables $f(x,y)$ and I want ...
1
vote
1answer
44 views
0
votes
1answer
35 views

Parameterize Subset of Complicated Zero Set

I recently asked this question: Evaluating Functions on Zero Sets (of other functions), and got fantastic assistance, but realized that there seems to be an extra issue when you're trying to ...
3
votes
2answers
128 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} ...
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 ...
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 ...
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 ...
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....
1
vote
0answers
35 views
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
38 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
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
1
vote
2answers
67 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 ...
4
votes
2answers
4k views

Plot Even Piecewise function

Is it possible in Mathematica to plot an even piecewise function like: $ f(x) = \begin{cases} 3t , 0 \le t \le \frac{\pi}{2} \\ 3t + 6 , \frac{\pi}{2} \le t \le \pi \end{cases}$ which has ...
3
votes
1answer
71 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" ...
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. @@...
10
votes
1answer
119 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 ...
26
votes
1answer
526 views

In 10.1.0 BenchmarkPlot doesn't work?

Bug introduced in 10.1 This bug was resolved in 10.2.0, but another bug was introduced in 10.3.0 persisting through 10.3.1 and finally resolved in 10.4 In Mathematica 10.1.0 and 10.3.0 ...
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: ...
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$. ...
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 ...