File:Indicator function illustration.png
From Wikimedia Commons, the free media repository
Jump to navigation
Jump to search
Size of this preview: 800 × 508 pixels. Other resolutions: 320 × 203 pixels | 640 × 406 pixels | 813 × 516 pixels.
Original file (813 × 516 pixels, file size: 19 KB, MIME type: image/png)
File information
Structured data
Captions
DescriptionIndicator function illustration.png | Illustration of an en:Indicator function. |
Date | (UTC) |
Source | self-made with MATLAB, source code below |
Author | Oleg Alexandrov |
This diagram was created with MATLAB.
Public domainPublic domainfalsefalse |
I, the copyright holder of this work, release this work into the public domain. This applies worldwide. In some countries this may not be legally possible; if so: I grant anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |
% illustration of an indicator function in two dimensions
function main()
% the number of data points. More points means prettier picture.
N = 400;
% a function close to what we want, but not smooth
Z = get_step_function (N);
% plot the surface
figure(2); clf; hold on; axis equal; axis off;
scale = 100;
surf(scale*Z);
% make the surface beautiful
shading interp;
colormap autumn;
% add in a source of light
camlight (-50, 54);
% viewing angle
view(-40, 38);
% save as png
print('-dpng', '-r200', 'Indicator_function_illustration.png');
% get a function which is 1 on a set, and 0 outside of it
function Z = get_step_function(N)
XX = linspace(-1.5, 4, N);
YY = linspace(-4, 4, N);
[X, Y] = meshgrid(XX, YY);
c = 2;
k=1.2;
shift=10;
Z = (c^2-X.^2-Y.^2).^2 + k*(c-X).^3-shift;
Z =1-max(sign(Z), 0);
This math image could be re-created using vector graphics as an SVG file. This has several advantages; see Commons:Media for cleanup for more information. If an SVG form of this image is available, please upload it and afterwards replace this template with
{{vector version available|new image name}} .
It is recommended to name the SVG file “Indicator function illustration.svg”—then the template Vector version available (or Vva) does not need the new image name parameter. |
File history
Click on a date/time to view the file as it appeared at that time.
Date/Time | Thumbnail | Dimensions | User | Comment | |
---|---|---|---|---|---|
current | 01:49, 27 September 2007 | 813 × 516 (19 KB) | Oleg Alexandrov (talk | contribs) | {{Information |Description=Illustration of an en:Indicator function. |Source=self-made with MATLAB, source code below |Date=~~~~~ |Author= Oleg Alexandrov }} <pre><nowiki> % illustration of an indicator function in two dime |
You cannot overwrite this file.
File usage on Commons
There are no pages that use this file.
File usage on other wikis
The following other wikis use this file:
- Usage on de.wikipedia.org
- Usage on de.wikiversity.org
- Usage on en.wikipedia.org
- Usage on en.wikibooks.org
- Usage on es.wikipedia.org
- Usage on fi.wikipedia.org
- Usage on fr.wikipedia.org
- Usage on gl.wikipedia.org
- Usage on hi.wikipedia.org
- Usage on id.wikipedia.org
- Usage on it.wikipedia.org
- Usage on ko.wikipedia.org
- Usage on ms.wikipedia.org
- Usage on nl.wikipedia.org
- Usage on sq.wikipedia.org
- Usage on sr.wikipedia.org
- Usage on sv.wikipedia.org
- Usage on ta.wikipedia.org
- Usage on uk.wikipedia.org
- Usage on vi.wikipedia.org