-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
273 lines (241 loc) · 12.3 KB
/
index.html
File metadata and controls
273 lines (241 loc) · 12.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!DOCTYPE html>
<html>
<head>
<title>Numerical computing with functions » Chebfun</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta charset="utf-8">
<link rel="shortcut icon" href="favicon.ico" />
<!-- Bootstrap -->
<link href="/css/bootstrap.min.css" rel="stylesheet"><!-- media="screen" -->
<link href="/css/normalize.min.css" rel="stylesheet"><!-- media="screen" -->
<link href="/css/chebsite.css" rel="stylesheet"><!-- media="screen" -->
<link href="/css/tomorrow.css" rel="stylesheet"><!-- media="screen" -->
<link href="/css/flexslider.css" rel="stylesheet"><!-- media="screen" -->
<link href='https://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700,400italic' rel='stylesheet' type='text/css'>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-LRD09XBKHN"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-LRD09XBKHN');
</script> </head>
<body>
<!-- Fixed navbar -->
<div id='navbar' class="navbar navbar-default navbar-fixed-top">
<div class="container nav">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"><span class="icon-bar"></span><span class="icon-bar"></span><span class="icon-bar"></span></button>
<a id="logo" href="/"><img src='/images/logo.png' /></a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav navbar-right">
<li><a href="/about">About</a></li>
<li><a href="/news">News</a></li>
<li><a href="/download">Download</a></li>
<li><a href="/docs">Docs</a></li>
<li><a href="/examples">Examples</a></li>
<li><a href="/support">Support</a></li>
<li><a href="/search"><span class="glyphicon glyphicon-search"></span></a></li>
<li><a href="https://github.com/chebfun/chebfun"><img id='github-logo' src='/css/github-logo.png'/></a></li>
</ul>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="page-wrapper homepage">
<!--
<div class='container main detached alert'>
<p>
</p>
</div>
-->
<div class='page-header'>
<h1>Chebfun<span class='sep'>—</span><span>numerical computing with functions</span></h1>
</div>
<div class="container main">
<div class="row">
<div class='description col-sm-12'>
<p>Chebfun is an open-source package for computing
with functions to about 15-digit accuracy. Most Chebfun commands
are overloads of familiar MATLAB commands — for
example <code>sum(f)</code> computes an integral,
<code>roots(f)</code> finds zeros, and <code>u =
L\f</code> solves a differential equation.</p>
</div>
<div class="links">
<a href='download' class='download'>DOWNLOAD</a><span class='sep'></span><a href='//github.com/chebfun/chebfun' class='browse-source'>BROWSE SOURCE</a>
</div>
</div>
</div><!-- div.main -->
<div class="container flexslider">
<ul class="slides">
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Create operator for Ginzburg-Landau problem</span>
d = 20*[-1.2 3.2 -1 1]; tspan = [0 46.5];
S = spinop2(d,tspan); S.lin = @(u) lap(u);
S.nonlin = @(u) u - (1+1.5i)*u.*(abs(u).^2);
<span class='comment'>% Set initial condition, solve PDE, plot</span>
S.init = chebfun2(@(x,y) ...
(1i*x+y).*exp(-.03*(x.^2+y.^2)), d);
u = spin2(S, 128, 1e-1, 'plot', 'off');
plot(real(u))
</pre></div><div class='imagewrap'><img src='demo5.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Create a chebfun on the interval [-3,3]</span>
x = chebfun('x', [-3 3]);
<span class='comment'>% Define a potential function</span>
V = abs(x);
<span class='comment'>% Plot the first 8 eigenstates of</span>
<span class='comment'>% the Schrodinger operator</span>
quantumstates(V, 8)
</pre></div><div class='imagewrap'><img src='demo4.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Create a chebfun f</span>
x = chebfun('x');
f = exp(-1/(x+1));
<span class='comment'>% Plot abs vals of Chebyshev coeffs of f</span>
plotcoeffs(f,'.')
</pre></div><div class='imagewrap'><img src='demo6.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Define a rectangular domain</span>
d = pi*[-2.2 2.2 -1 1]/2;
<span class='comment'>% Create a complex-valued chebfun2</span>
f = chebfun2(@(z) ...
cos((z-1).^2)+exp((z+1).^2), d);
<span class='comment'>% Plot its phase portrait</span>
plot(f)
</pre></div><div class='imagewrap'><img src='demo7.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Construct a pair of 2D chebfuns</span>
d = [-3 10 -3 3];
f = chebfun2('y.*cos(y.^2+x)-.1',d);
g = chebfun2('cos(x.^2/2).*sin(y.^2)-.1',d);
<span class='comment'>% Plot zero contours of f & g</span>
plot(roots(f)), hold on, plot(roots(g))
<span class='comment'>% Plot their common roots</span>
r = roots(f, g, 'resultant');
plot(r(:,1), r(:,2), '.')
</pre></div><div class='imagewrap'><img src='demo9.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Define two functions</span>
f = chebfun(@(x) sin(x^2)+sin(x)^2, [0,10]);
g = chebfun(@(x) exp(-(x-5)^2/10), [0,10]);
<span class='comment'>% Compute their intersections</span>
rr = roots(f - g);
<span class='comment'>% Plot the functions</span>
plot([f g]), hold on
<span class='comment'>% Plot the intersections</span>
plot(rr, f(rr), 'o')
</pre></div><div class='imagewrap'><img src='demo1.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% Airy operator</span>
op = @(x,u) 0.01*diff(u,2) - x*u;
<span class='comment'>% Create a chebop</span>
L = chebop(op, [-5,5]);
<span class='comment'>% Apply boundary conditions</span>
L.bc = 'dirichlet';
<span class='comment'>% Solve the differential equation</span>
u = L \ 1;
plot(u)
</pre></div><div class='imagewrap'><img src='demo2.png' /></div>
</li>
<li>
<div class='codewrap'><pre class='code'><span class='comment'>% The Dixon-Szego function</span>
f = @(x,y) (4-2.1*x.^2+ x.^4/3).*x.^2 ...
+ x.*y + 4*(y.^2-1).*y.^2;
<span class='comment'>% Create a chebfun2</span>
F = chebfun2(f, [-2,2,-1.25,1.25]);
<span class='comment'>% Find the minimum and mark it</span>
[minf,minx] = min2(F);
contour(F,30), hold on
plot(minx(1),minx(2),'.w')
</pre></div><div class='imagewrap'><img src='demo3.png' /></div>
</li> </ul>
</div>
<div class="container main detached">
<div class="row">
<div class="col-md-12" role="main">
<div style="text-align: center">Check out the <a href="http://groups.google.com/forum/#!forum/chebfun-users">Chebfun users group</a>!</div>
<h2>Latest news</h2>
<ol class='news slats'><li>
<a href='/news/20211206-20th-birthday.html'>
<span class='read-more'>read more »</span>
<h3><span class='date'> 6 December 2021</span><span class='sep'>/</span>20th anniversary of the Chebfun idea</h3>
<p class='oneline'>Chebfun team members gathered Dec. 4 to celebrate the 20th anniversary of the invention of Chebfun.</p>
</a>
</li><li>
<a href='/news/20210604-billion-FOV.html'>
<span class='read-more'>read more »</span>
<h3><span class='date'> 4 June 2021</span><span class='sep'>/</span>Chebfun computes 250 million fields of values</h3>
<p class='oneline'>Michael Overton has called FOV about 250 million times in investigating the Crouzeix conjecture.</p>
</a>
</li> </ol>
<div class="row widgets">
<div class="col-sm-4">
<a class="widget" href="download">
<h3>Download »<span class="glyphicon glyphicon-download" style='float:right'></span></h3>
<p>Chebfun runs in standard MATLAB with no toolboxes required. You'll be up and running in seconds.</p>
</a>
</div>
<div class="col-sm-4">
<a class="widget" href="docs/guide">
<h3>Get started »<span class="glyphicon glyphicon-off" style='float:right'></span></h3>
<p>Browse the Chebfun Guide, an in-depth introduction to Chebfun's capabilities.</p>
</a>
</div>
<div class="col-sm-4">
<a class="widget" href="examples">
<h3>View Examples »<span class="glyphicon glyphicon-th" style='float:right'></span></h3>
<p>The gallery contains hundreds of examples of Chebfun's mathematical applications.</p>
</a>
</div>
<!--
<div class="col col-sm-6 col-md-3">
<a class="widget" href="develop">
<h3></span>Contribute »<span class="glyphicon glyphicon-wrench" style='float:right'></span></h3>
<p>Chebfun is open-source and hosted on Github. We're always looking for new developers.</p>
</a>
</div> -->
</div>
</div>
</div>
<div style="width:100%; height:21px;">
<div style='float:right; width:80px; height:21px;'>
<!--<iframe src="http://www.facebook.com/plugins/like.php?href=http://www.chebfun.org&layout=button_count&show_faces=false&width=80&action=like&colorscheme=light"
scrolling="no" frameborder="0" style="border:none; width:95px; height:20px"></iframe>-->
<iframe src="//www.facebook.com/plugins/like.php?href=https%3A%2F%2Fwww.facebook.com%2Fchebfun&width&layout=button_count&action=like&show_faces=false&share=false&height=21&appId=235786849818106" scrolling="no" frameborder="0" style="border:none; overflow:hidden; height:21px;" allowTransparency="true"></iframe>
</div>
<div style='float:right; width:60px; height:20px; margin: 0 15px;'>
<a href="https://twitter.com/chebfun" class="twitter-follow-button" data-show-count="false" data-show-screen-name="false">Follow</a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
</div>
</div>
</div>
<div class="footer">
<p>© Copyright 2025 the University of Oxford and the Chebfun Developers.</p>
<!-- TESTING -->
</div>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script type="text/javascript" src="https://code.jquery.com/jquery-1.7.2.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script src="/js/bootstrap.min.js"></script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js?lang=matlab" type="text/javascript"></script>
<script type="text/javascript" src="/js/config.js"></script>
<script type="text/javascript" src="/js/jquery.flexslider-min.js"></script>
</body>
<!-- Compiled on Thursday, 21 August 2025 at 11:51. -->
</html>