You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/usage/constructors.md
+51-19Lines changed: 51 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,21 +8,51 @@ end
8
8
9
9
`Fun`s in ApproxFun are instances of Julia types with one field to store coefficients and another to describe the function space. Similarly, each function space has one field describing its domain, or another function space. Let's explore:
10
10
11
-
```@repl
12
-
x = Fun(identity,-1..1);
13
-
f = exp(x);
14
-
g = f/sqrt(1-x^2);
15
-
space(f) # Output is pretty version of Chebyshev(Interval(-1.0,1.0))
16
-
space(g) # Output is pretty version of JacobiWeight(-0.5,-0.5,Interval(-1.0,1.0))
11
+
```jldoctest
12
+
julia> x = Fun(identity,-1..1);
13
+
14
+
julia> f = exp(x);
15
+
16
+
julia> g = f/sqrt(1-x^2);
17
+
18
+
julia> space(f) # Output is pretty version of Chebyshev(Interval(-1.0,1.0))
19
+
Chebyshev(-1..1)
20
+
21
+
julia> space(g) # Output is pretty version of JacobiWeight(-0.5, -0.5, -1..1)
22
+
(1-x^2)^-0.5[Chebyshev(-1..1)]
17
23
```
18
24
19
25
The absolute value is another case where the space of the output is inferred from the operation:
In higher dimensions, ApproxFun will sum products of the 1D basis functions. So if ``\mathop{T}_i(x)`` is the ``i``th basis function, then a 2D function can be approximated as the following:
@@ -79,10 +110,11 @@ For example, if we are in the two dimensional CosSpace space and we have coeffic
0 commit comments