1 vote
200 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}] ...
• 586
918 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, ...
• 1,471
2k views

### How to handle Part function error when position does not exist?

Say a list list={{1,2},{3,4}}, list[[1]] and list[[2]] works. But ...
• 599
2k views

### Numerically integrating a list-valued function [duplicate]

I want to NIntegrate a List valued function foo[x] which is only defined for numerical ...
• 389
2k views

### NIntegrate receiving a function with NumericQ which returns a list

Can some one please explain why ...
• 586
9k 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. ...
• 869
205 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 ...
• 238k
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 ...
• 53
536 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 ...
• 1,217
262 views

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

Take a simple BSplineFunction and evaluate it at 0.25. ...
• 73
103 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: ...
134 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. ...
• 393
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. <...