Linked Questions

1
vote
1answer
172 views

Passing f[x][[1]] to FindRoot [duplicate]

FindRoot seems to fail for most examples of the form f[x_?NumericQ] := {x - 3 , x^3}; FindRoot[f[x][[1]], {x, 3}] ...
13
votes
6answers
756 views

An elegant way to plot a numeric function that returns a list, and have each element in a different color [duplicate]

I have a function that takes a numeric argument and returns a list of numbers. I want to plot each element of the list in a different color. If I use this command, ...
6
votes
3answers
1k views

Numerically integrating a list-valued function [duplicate]

I want to NIntegrate a List valued function foo[x] which is only defined for numerical ...
9
votes
1answer
1k views

NIntegrate receiving a function with NumericQ which returns a list

Can some one please explain why ...
3
votes
1answer
6k views

Minimizing using indices, error: Part::pkspec1: The expression cannot be used as a part specification

I want to use Minimize where the variables to minimize are indices pointing into an array. Here a MWE that hopefully shows what my problem is. ...
8
votes
3answers
154 views

Indexed and array-valued interpolations

Bug introduced in 10.1 or earlier and fixed in 10.4.0 Using Indexed on an InterpolatingFunction leads to an ...
4
votes
2answers
1k views

FindFit “is not a real number” error when fitting a parametric function to the data

I am using Mathematica's FindFit function to fit a parametric solution to my data and I am getting the error ...
5
votes
2answers
412 views

Integrating a list of functions

For the purpose of this minimal example, let's say we have a list of functions, like this: f[y_?NumericQ] := {NIntegrate[z*y, {z, 0, 1}], a y} I want to ...
6
votes
1answer
153 views

Why don't optimization functions like FindMinimum work with functions like BSplineFunction? [duplicate]

Take a simple BSplineFunction and evaluate it at 0.25. ...
0
votes
1answer
238 views

Order of evaluation in nested expression

I am trying to make a function that works as follows: Integrate 1 for all t in the interval $ [0,1] $ such that the first element of function vstar is positive. <...
2
votes
1answer
82 views

function on parts of lists works only in pure function?

For example, I'd like to take the first four upper left values of a matrix, i.e. f[x_] := f[x] = x[[;; 2, ;; 2]]; This works nicely, e.g. ...
3
votes
1answer
48 views

RecurrenceTable involving inputs from a vector

Directly going to the issue, my problem is how to use a RecurrenceTable when it have inputs from a vector defined previously. For instance I have: ...
0
votes
2answers
34 views