Questions about the use of built-in Mathematica functions, including pure functions.

learn more… | top users | synonyms

1
vote
1answer
97 views

How to fill a Marshal buffer with whitespace using NETLink

Further to Todd Gayley's answer on string handling in a DLL function, I have the following code: ...
11
votes
1answer
187 views

Compability between Graphics coordinates and shifted projections in GeoGraphics

Edit 27.01: Confirmed bug. V. 10.0.0 - V. 10.1.0 I'd expect GeoGraphics to handle positions of points since they are provided ...
3
votes
1answer
56 views

LineScaledCoordinate problem for exact coordinates

Edit: Confirmed bug. CASE:2326540. Still the case in V 10.1. Solution: Wait and use N meanwhile. I've faced this problem ...
0
votes
1answer
73 views
0
votes
1answer
221 views

mathematica apply list of functions to the same arguments [closed]

EDIT: "Through" is partial solution, because it cannot be used in expressions, where these functions are used without arguments. How can I apply list of functions to the same arguments? e.g. ...
0
votes
1answer
62 views

Calculating functions of sounds

I've seen that it is possible to create a sound from functions: Sound[{Play[Sin[1000 t (1 + t^2)], {t, 0, .2}], Play[Sin[500 t (1 + t^3)], {t, 0, .5}]}] Is is ...
6
votes
2answers
68 views

Maximise output issue

When I execute the following command, I get a numerical output as follows: ...
10
votes
4answers
3k views

How can I differentiate Numerically?

Mathematica has two ways to integrate: Integrate and NIntegrate. But what about D? ...
1
vote
3answers
148 views

How to calculate time period?

I have the starting and ending dates and times. And I need to calculate the night time in this period (from 10 pm (22) to 6 am (6)). Example: starting date and time is {2015, 1, 4, 3, 10} ending date ...
6
votes
4answers
213 views

What is shorthand way of Reap list that may be empty because of zero Sow

Sometimes because of conditionals, you cannot guarantee that Sow will be called at least once. Reap[Sow[1]][[2,1]] results in ...
0
votes
0answers
39 views

Procedure argument value change [duplicate]

I'm trying to create my own hamiltonian cycle algorithm using Mathematica for school, and I'm stuck on a syntax issue. I get the following error: ...
0
votes
0answers
44 views

Passing integration constants to self defined function

I would like to evaluate an integral I am taking in cylindrical coordinates, in which the integrand contains a previously defined function. I need to pass the r and phi integrand values to this ...
0
votes
0answers
50 views

Improving RationalInterpolation Result

The following code produces a {4,4} rational interpolation approximation accurate to 10^-6 or better over the range ...
0
votes
3answers
40 views

Define a function of a vector without fully specifying the components of the vector [duplicate]

I have a vector $A=\{1,2,3,4,5,6\}$, and I want to define a function of $A$ as f[A_]:=A.X where $X$ is another vector. I want to define this function without ...
1
vote
2answers
63 views

How to make function accept list of rules as an argument?

Considering the list of rules: r= {"a" -> "1", "b" -> "2", "c" -> 3, d -> 231, "e" -> 1.25}; I want to have a function ...
0
votes
0answers
46 views

How to make Piecewise continuous [duplicate]

I have a function defined by its slope in a continuous sequence of intervals, e.g. ...
0
votes
1answer
69 views

Codes for the derivative of a random polynomials

Good day! Please, I need some help here, I used this codes ...
1
vote
3answers
141 views

Simplify a composition of functions

How do I make Mathematica simplify, for example, (1-#&)@*(1-#&) into #&? ...
1
vote
2answers
141 views

Minimizing the largest difference between two functions

I have two functions defined on the same domain, $f(x)$ and $g(x)$ where $x$ is in $(0,1)$: f[x_] := (-1 + x) Log[1 - x] - x Log[x] g[x_] := Log[1 + 2 (-1 + x) x] ...
0
votes
3answers
122 views

How to define a function

How can I define a function which depends on a function of x? Something like this f[u[x]_,u[x]']= u[x]' + a [x] u[x] +b[x] I think I wasn't enaugh clear. If I ...
3
votes
2answers
129 views

What's real analogue for FromDigits?

FromDigits only works for integer strings. What's its real-number analogue?
2
votes
2answers
66 views

How to apply list of values to a list of functions

I have the following: first= {1+a,2+a,3+a,4+a} and a list t={0,1,2,3} I want to evaluate the first element of "first" at ...
1
vote
1answer
36 views

Calculate the partial vapor pressures of a variable at xB = 0.75 based on the interpolation functions of the data

I'm having troubles in solving an exercise for an assignment in my Chemistry course. Talking about interpolations, I've already have a graph but I need to:(c) Calculate the partial vapor pressures of ...
0
votes
3answers
84 views

Using Solve to obtain a constant so that f(x) is continuous at x=2

I need to solve for c such that the function is continuous at x=2. How do I do this automatically? I have expressions for ...
2
votes
1answer
72 views

How to package a function for export?

I often post code for functions on Stack-Exchange, and then later find that they are unexecutable - that people can't use them because I mistakenly omitted some private functions or values that are ...
5
votes
1answer
68 views

Using a progress bar in a functional expression

If we have a procedural construct like a Do loop or Table, it is straightforward to make a progress bar to indicate the percent ...
1
vote
1answer
91 views

What are the terms of the sequence generated by Zeta(3s)/Zeta(s)?

The LiouvilleLambda function has Dirichlet generating function of Zeta[2s]/Zeta[s]. I am curious about an analogous function with Dirichlet generating function of Zeta[3s]/Zeta[s]. Can Mathematica ...
0
votes
1answer
81 views

how to download using weather data function many proporties exactly.

how to download using weather data function many proporties exactly. Example WeatherData["WMO44292", "Humidity", "Pressure", "Temperature", \ {{2005, 1, 1, 0, 0}, {2015, 1, 1, 0, 0}}] .
2
votes
2answers
65 views

NotebookWrite in EvaluationBox forces Input CellStyle

There is a promissing new function EvaluationBox[] and a nice last example in documentation section for it: ...
1
vote
1answer
39 views

How to change time zone for all outputs? [closed]

How to change the time zone in Mathematica for all functions returning a date or time?
3
votes
1answer
50 views

How should I define functions that distribute over Plus?

I have a linear function which also follows the chain rule (it is a derivation), so I defined it recursively, following a Wolfram tutorial (which I've misplaced) and other related answers: ...
1
vote
1answer
89 views

Working with derivative of conjugate of a complex number

I have a complex function, lets say $g(x)$. I want to take its and its conjugate's derivative. I need the solution of derivative which must be symbolically and computationally efficient. Lets take an ...
2
votes
1answer
192 views

Weierstrass function

I am trying to create plot of the Weierstrass function in Mathematica. I wonder if it's possible, when I define this function as ...
1
vote
1answer
70 views

FunctionDomain doesn't work with If

When I call FunctionDomain for function defined by a formula with If, for example ...
1
vote
0answers
49 views

How to simplify an expression with a radical sign nesting in a radical sign

Is there a function can simplify an expression with a radical sign nesting in a radical sign in Mathematica? I use V9. RatDenmon is a function that can ...
0
votes
2answers
88 views

Function with condition

I am starting my adventure with Mathematica. I would like to know if is there possibility to create function described by formula for example f(x):=1+2^n where 2^n < x. I have problem with this ...
1
vote
1answer
46 views

Tooltip : Mapping list of Tooltip values to list of functions while plotting

How is it possible to map a list of Tooltip values to the functions being plotted? For example: Assume, f1[x], f2[x], f3[x]... are functions defined. {t1, t2, t3, ...} are the list of tool-tips to ...
1
vote
2answers
50 views

Problem with Replace function [closed]

I recently started using Mathematica. I'm not able to understand my mistake. I'm trying to implement the Frangi vesselness for the enanchement of vessels in biomedical images. I wrote these functions: ...
0
votes
1answer
34 views

Generating comma separated input for LCM [duplicate]

I would like to calculate the Least Common Multiple of the 100 first numbers. I've tried with LCM[Table[i, {i, 10}]] But it produces a list instead of the right ...
0
votes
0answers
43 views

Piecewise function output response interpretation

Piecewise[{{t^2, t <= 0}, {t, t >= 0}}] Outputs: t^2 t <= 0 t t >= 0 0 True What does the last line of output 0 True mean? Sometimes it ...
0
votes
1answer
89 views

Simultaneously fitting two data sets to two functions is too slow [closed]

I have to fit two data sets to two functions(eps1,eps2) with same parameters (w0,f,g) Initially, I know only one function ...
1
vote
2answers
103 views

Evaluate a list

I have a function $f(x_1,\cdots,x_n)$ that takes $n$ arguments, and I would like to evaluate it using a list of lists $\lbrace\lbrace x_1,\cdots,x_n \rbrace,\cdots,\lbrace x_1',\cdots,x_n' ...
1
vote
1answer
43 views

Defining functions that depend upon other functions which depend upon other functions and so on

The problem is that I have to evaluate functions, that take output from previous functions, and combine them to form new functions, and do some operations and evaluate the value at new function. But, ...
0
votes
1answer
52 views

Does Mathematica always return a rational number in its simplified form? [closed]

If I enter: 1/RandomInteger[10^200]+1/RandomInteger[10^200] I get (instantly) an exact fraction. Is this fraction in simplified (reduced) form? In other words is ...
0
votes
1answer
50 views

FindRoot over a function with some constant variables

I would like to perform the FindRoot command over the function func. Suppose: ...
7
votes
2answers
648 views

How to programmatically covert a function-like rule to a pure function?

Is there a programmatic way to convert a Mathematica rule that acts like a typical mathematical function of one variable into the equivalent pure function? For example, the code should convert ...
2
votes
1answer
50 views

How do I make Mathematica nest argument changes?

I want something like Nest[f,x,n], but what where f is an argument change like a pushforward and x[t] is a function, for example, symbolically, and not in any sort of code: $$ F{x[t]} \equiv x[2t + ...
1
vote
1answer
109 views

Quantum Physics question [closed]

I'm not sure if anyone here would be able to help me. But if you know a more appropriate place where I could ask for help, please let me know. So here's the question: And here's my attempt at ...
3
votes
1answer
83 views

Why is left NumberPadding always applied in NumberForm?

I would like to display numbers like 9.0001 and 10.0001 in the fixed-width form of xx.xxxx. ...