Questions tagged [functions]

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

2,628 questions
Filter by
Sorted by
Tagged with
36 views

What to input for Nested ANOVA on Mathematica (SS-Subgroup B)

Does anyone know how to run a nested ANOVA on Mathematica, given a dataset? For example: PCB Level 1, Sample 1: {1,2,3}; PCB Level 1, Sample 2: {4,3,2}; PCB Level 2, Sample 1: {1,5,7}; and PCB Level 2,...
102 views

How to find the operand of a sinusoid?

For a function $\sin[2x]$, the operand is $2x$. If we want know the value of the operand by hand, the function is simply $\arcsin(\sin[2x])=2x$. How to do this with Mathematica? Here's what I tried: ...
80 views

Use Alphabet[] as a variable in a function

I'm trying to figure out if I can use the letters contained in Alphabet[] as variables for a function. As a simplified example, I'd like to do something like: ...
147 views

Trying to understand Electromagnetism using mathematica

I was wondering if there was a possible way to animate electric and magnetic field lines using Mathematica? I'm currently doing a physics major and taking an upper level electromagnetism course. I'm ...
128 views

30 views

error for NMinimize with Parameters in the form f[a_]:=NMinimize

I'm trying to write a function of a variable as the argument of a minimization where that variable comes to play. Here is the code : ...
30 views

Creating a special product function

I am having trouble working with lists inside functions with Mathematica. Basically, I have a list of numbers and a special way to multiply them. I want to have a function that is able to create a ...
63 views

Define Function explicitely with List as argument [duplicate]

Background There are multiple ways to define Functions. I would assume all methods are equivalent, and allow for the same options. However, I fail to find the ...
36 views

Order of evaluation of variable

I'd like to control the order of evaluation in a multi-variable function. Example: Suppose I have the function: B[x_, y_] := x + y/x; If I try to evaluate ...
48 views

Get R^2 value between interpolating functions and a list of points

I am looking to compare the degree of accuracy of a theoretical model by comparing my theoretical curve to my experimental data points. My theoretical curve is an interpolating function generated ...
43 views

Use a list with single number for the second input of Table

As you see both inputs below give the same results. Is there any reason to use List[3] instead of just 3 in the first case? <...
100 views

When do functions apply on lists and when they do not

I have read in my lecture notes on Mathematica that functions (in the general sense) can be applied to lists of data and that they can return new lists with data. I have tried this and I have got ...
75 views

NonlinearModelFit won't fit to gaussian data

The form I'm using should be correct because when I input my initial guesses it plots a shape similar to my data. When I use NonlinearModelFit, the fit is not correct at all and is almost flat, then ...
36 views

Derivative of function with large number of arguments

I have a function which depends on more than 30 parameters and I want to symbolically compute the derivatives with respect to the individual parameters. From the documentation of the ...
40 views

I've been try to plot this function but it's not work. It's in the body [closed]

Plot[z^7 - 5*z^4 + 3*z^2 + 6*z - 4, {z, -2 - 2*I, 2 + 2*I}]