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

learn more… | top users | synonyms

5
votes
3answers
73 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: ...
116
votes
8answers
10k views

List of compilable functions

Is there somewhere a list on the functions that Compile can compile, or the cases in which a particular function can be compiled that I haven't found? I'd be glad ...
1
vote
1answer
103 views

Conjugate[a/b + c/d]

Trying to obtain the result of Conjugate[a/b+c/d] only gives the same result. As such, I use Refine as: ...
0
votes
0answers
11 views

2 functions in a package for CDF, 1 is OK 2nd is not working

I am developing a CDF application to teach me how to create CDF files. In this application I am taking numeric and symbolic integral of a function. I create package with two functions; 1-taking the ...
4
votes
1answer
114 views

What is wrong with my code so it neither produces a correct plot nor an error message?

I am trying to define some initial functions and then using them to define my secondary functions and then plot the secondary functions. I am supposed to get two curves with a finite width ...
0
votes
0answers
39 views

The function I defined is not giving any output [on hold]

Could anyone tell me why the function I have defined is not giving any output? When I run it, gen is not showing any output. Thanks! ...
0
votes
0answers
44 views

How to apply a function to a list, being able to use a list index inside of the function? [on hold]

In the documentaion I find things like: M = {a, b, c}; kappa[x_, y_, z_] := x PauliMatrix[1] + y PauliMatrix[2] + z PauliMatrix[3] kappa @@ M // MatrixForm But ...
0
votes
1answer
83 views

Defining a function with algebraic parameters [on hold]

I am trying to define and use a function to represent the eigenstates of a Quantum Harmonic Oscillator, which have the general form: $$\psi_{n}(x) = \frac{1}{\sqrt{2^{n} n!}}\left(\frac{m \omega}{2 ...
1
vote
0answers
37 views

finding list by expresion

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
228 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 ...
0
votes
1answer
145 views

Check an inequality if one condition holds

A = Abs[-1 + 1/(1 + β)] + Abs[-((1 + 2 α + Sqrt[1 + 4 α + 4 α β])/(2 α + 2 α β))] Is A <1 if ...
3
votes
3answers
192 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))] ...
2
votes
1answer
64 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 ...
72
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
54 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$ ...
0
votes
0answers
23 views
0
votes
2answers
63 views

Interpolation of a vector [on hold]

How can we use a sample data for interpolation of a function within a domain. But I need all interpolated values at once in a vector format. For instance, below I create a range of values for ...
0
votes
1answer
48 views

Intercept in the ARProcess

In the ARProcess help file I don't understand whether an intercept is included or not. How would I add one? I am using version 9 of Mathematica.
2
votes
1answer
57 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 ...
1
vote
1answer
43 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? ...
4
votes
1answer
79 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
39 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 ...
40
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
237 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
51 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
135 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
52 views

What is this function aimed to do?

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
60 views

Scan over regions of parameters

I have a function f which takes three arguments x, y and z: ...
-2
votes
0answers
29 views

Is this definition invalid? [closed]

I would expect this to find the minimum to be 0, while this seems to be thinking that the value is a (for all values? dunno) Plotting the function doesn't work ...
0
votes
1answer
502 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
42 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
105 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
128 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
49 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
102 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
36 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
23 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
38 views
0
votes
1answer
31 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
113 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
103 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
32 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
110 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
133 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 ...
1
vote
0answers
35 views
2
votes
1answer
63 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
2answers
124 views

How do I get Series[] as a functional, rather than as an expression (i.e. to avoid the dummy variable)?

How can I write an equivalent to Series that doesn't require a dummy variable? Note that the series should be constructed before the evaluation point is supplied, ...
1
vote
0answers
35 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? ...