Tag Info

Hot answers tagged

5

As Öskå commented Show and Graphics is the way to go: m = {{0, 1}, {-1, -3}}; ev = Eigenvectors[m]; Show[ StreamPlot[m.{x, y}, {x, -3, 3}, {y, -3, 3}], Graphics[{Red, Arrow[{{0, 0}, #}] & /@ ev}] ]


3

This is a manifestation of the issue raised in this question, that Equal for packed arrays is handled in a non-standard way, causing the Listable attribute to be ignored. Range[8] returns a packed array, so for that case the non-standard evaluation kicks in. But the explicitly entered list {1, 2, 3, 4, 5, 6, 7, 8} is not a packed array, so you get the ...


3

function = c1 # + c2 #^2 + cn #^3 & ; constraints = {function[1] == 5, function'[-1] == 3, function''[1] == 1}; Solve[constraints] (* {{c1 -> 97/22, c2 -> 7/11, cn -> -(1/22)}} *)


3

Here is the example from the documentation adapted for the OP's data: data = Partition[MapIndexed[Flatten[{#2, #1}] &, {2, 5, 9, 15, 22, 33, 50, 70, 100, 145, 200, 280, 375, 495, 635, 800, 1000, 1300, 1600, 2000, 2450, 3050, 3750, 4600, 5650, 6950}], 4, 1]; f = Interpolation@data InterpolatingFunction[{{1, 26}}, <>] pwf = ...


2

There is no documented built-in way to convert the InterpolatingFunction object into explicit Piecewise form (thanks to @MichaelE2 for the link!). So the only possibility to get an explicit interpolating function is to re-implement the built-int Interpolation in the high-level Mathematica language. I have already done this for the built-in "Spline" method ...


1

I think this readily explained by looking at the own-values of the variable after the assignment is made. v = {a, b, c}; v[[2]] = Sequence[e, f]; OwnValues @ v {HoldPattern[v] :> {a, Sequence[e, f], c}} It's rather like Defer, so it will behave like {a, e, f, c} under standard evaluation. But it can behave differently in non-standard evaluation. ...


1

It might be interesting for you to compare @Jens' answer with FunctionDomain (new in V10): compare[fun_] := { fun[x], FunctionDomain[fun[x], x, Reals], FunctionDomain[fun[x], x, Complexes], analyticityCondition[fun, x], singularCondition[fun, x]} TableForm[ compare /@ {Sin, Tan, f, g, h}, TableHeadings -> {None, {"Function", "RealDomain", ...



Only top voted, non community-wiki answers of a minimum length are eligible