Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Questions about the use of built-in Mathematica functions, including pure functions.
7
votes
Accepted
Suppress computation in table
So you want something like this:
f[x_?VectorQ] := Most @ x + Rest @ x // Evaluate // Defer
then
f[{x,y}] + f[{x,0}] + f[{0,y}]
{x} + {y} + {x + y}
1
vote
List as function argument
Take a look at the result of the partial expression within your Q function:
Times @@@ {Iinit}
{2.123*10^-134}
It produces a list (e.g. a vector) but what you want for your multiplications seem …
4
votes
Accepted
How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
With a little help from other sources and the links given as a comment to my question I came up with a solution. Essentially Gauss-Krüger is a variant of the Transversal Mercator projection so this pr …
4
votes
Accepted
Manipulate - function of a function
In Mathematica you can work with formulae as well as with functions. It is probably best to stick to one approach and not mix. … (aka delayed definitions)
This will work using functions:
y[x_, α_] := -3 x + 2 α
m[α_, y_] := α + y
Manipulate[
Plot[
m[ alpha, y[x, alpha] ],
{x, 0, 10}
],
{alpha, 0 …
8
votes
1
answer
2k
views
How can you use and convert Gauss-Krüger-Coordinates in Mathematica?
geodetic coordinate system) and a High-value (North-value in UTM; x-coordinate int the geodetic coordinate system)
Far from being an expert in geodesy the way I understand it Mathematica's geodetic functions … Thus:
How can I enter the Gauss-Krüger-Coordinates into Mathematica so they can be used for distance-calculations and conversions using Mathematica's geodetic functions? …
23
votes
3
answers
625
views
Is there a bug in Pick?
I wanted to use the Pick function with a condition. But there seems to be an issue here. Take a look at this:
selection = {0,1.2,3,0.,5};
Pick[{1,2,3,4,5},selection,elem_ /; elem =!= 0]
In Mathemat …
2
votes
Accepted
Using Apply on a function with multidimensional input
There are probably many ways to do this and here are just some examples to get you going into the right direction.
First note that you might simply use Sequence:
f[a_,b_,m_] := {a :> m[[1,1]]*a + m[ …
1
vote
Any built-in function for this code?
Another possibility is to make this a distribution and then use all the machinery that goes with that:
SeedRandom["December 27, 2017"];
distReaction = With[
{
reaction = {0.2, 0.5, 1}
…
3
votes
How to use FinancialData[] function to filter stocks based on closing price?
A variation to Xminer's answer:
With[
{
names = FinancialData["NYSE:UN*", "Lookup"], (* use "NYSE:*" for more *)
lower = 10,
upper = 100 (* use 12 for your example *)
…
5
votes
Reshaping associations, generalization of GroupBy
Here is the approach I would take to transform your dataset to a nested Association:
Clear[ makeNested ];
makeNested[ assoc_, keylist_] := GroupBy[
assoc,
keylist
] // Apply[
Association,
…
2
votes
how to include more options for built-in options?
First we set up a global variable that assigns aspect ratio functions:
$aspectRatioFunctions = Function[ func,
Switch[ func,
"ratio2", Function[ {p1,p2}, 2 p1/p2 ],
"ratio3", Function …
2
votes
Accepted
Loading MultivariateStatistics` changes colour of some multivariate distributions to red in ...
Michael E2 has already hinted at what happens here. To get a deeper understanding of the issue a good place to start is the tutorial
Modularity and the Naming of Things
There you will find the s …
2
votes
Accepted
Evaluating Series at a point not working
You can get rid of the O using Normal:
(* using your reported output *)
out = Abs[-12. + (1.95833 + 7.7 I) beta + (1.40482 - 0.584549 I) beta^2 +O[beta]^5/2]^2;
Plot[ Evaluate @ Normal @ out, { bet …