Tag Info

New answers tagged

4

Mathematica doesn't realise you want x to be a vector, so you have to tell it what you want more precisely: Module[{a, b, x, y}, a = {8, -2}; b = {3, 3}; Flatten@({x, y} /. Solve[{x, y} + a == b, {x, y}])] This gives as output: {-5, 5}


9

It's already built-in. It's called Cross. Cross[{1, 2}] Output is {-2, 1}


0

foo[v_]:= ({a, b} /. Solve[{a, b} . v = 0, {a, b}])[[1]]


0

As was mentioned in the comments above as of yet Mathematica is not able to estimate VAR processes. So I've tried and implemented VAR estimation function. Actually I've directly translated Cesa-Bianchi's MATLAB code [1]. My code is available here: http://www.alexisakov.com/p/economica.html. Here is a simple example: <<Economica` S = ...


2

This seems to do the right thing: VectorPlot[(-efield), {x, -10, 10}, {y, -10, 10}, AspectRatio -> Automatic, VectorScale -> {Automatic, Automatic, 1/#5^2 &}] (although you might want to twiddle the scaling parameter). Notice that the scaling function is a function of five parameters, of which the norm of the gradient is the last, hence #5.


1

(* equation for your vector*) lin[a_, vec_, pt_] := a vec + pt (* Param eq. for the surface of a triangle *) c[s_, t_, v_] := v[[1]] (1 - t) s + v[[2]] t s + v[[3]] (1 - s) (*which triangle and the parameters*) s1 = NSolve[{lin[a, vec, pt] == c[s, t, #], 0 < s < 1, 0 < t < 1}, {a, s, t}] & /@ triangles (* {{}, {{a -> -1.42384, s -> ...


2

You get meaningful output by multiplying the tiny values of poljez0 with some large number and limiting the Z-PlotRange: Graphics3D[{Darker@Blue, Arrowheads[0.02], MapThread[Arrow[{#1, #2}] &, {tockez0, poljez0*10^12 + tockez0}]}, PlotRange -> Automatic, BoxRatios -> {1, 1, 1}, Axes -> True, AxesLabel -> {x, y, z}, FaceGrids -> ...


2

If I understood you correctly you can use ListDensityPlot: pointsz0 = ToExpression@Import@"http://pastebin.com/raw.php?i=VQfP0HgB"; table = ToExpression@Import@"http://pastebin.com/raw.php?i=7g4QNPPw"; ListDensityPlot[Append[pointsz0[[#, ;; 2]], table[[#]]] & /@ Range@Length@table]


2

I think your original idea of using Graphics3D was the right idea. To get output from Graphics3D that looks good, you need to scale up the z-axis. I did that with the option BoxRatios and got the following. Graphics3D[{Arrowheads[Small], MapThread[Arrow[{#1, #2}] &, {points, points + vectors}]}, BoxRatios -> {1, 1, 1.25}, Axes -> True, ...



Top 50 recent answers are included