File:Nearest2DInterpolExample.png
From Wikipedia
Jump to navigation
Jump to search
Original file (1,316 × 1,038 pixels, file size: 9 KB, MIME type: image/png)
This file is from a shared repository and may be used by other projects. The description on its file description page there is shown below.
Summary
Matlab code
[Xcoarse, Ycoarse] = meshgrid([0 1 2 3], [0 1 2 3]);
[Xfine, Yfine] = meshgrid(linspace(0,3,300), linspace(0,3,300));
DataCoarse = [ 1 2 4 1; ...
6 3 5 2; ...
4 2 1 5; ...
5 4 2 3];
DataNearestFine = interp2(Xcoarse, Ycoarse, DataCoarse, Xfine, Yfine, 'nearest');
figure
surf(Xfine, Yfine, DataNearestFine); shading flat; colormap(jet); view(0, 90)
hold on; plot3(Xcoarse, Ycoarse, 10*ones(size(Xcoarse)), 'k.', 'MarkerSize', 20)
colorbar
print -dpng -r200 Nearest2DInterpolExample.png
PNG file have also been cropped before uploading
Licensing
| Public domainPublic domainfalsefalse |
| This work has been released into the public domain by its author, Berland. This applies worldwide. In some countries this may not be legally possible; if so: Berland grants anyone the right to use this work for any purpose, without any conditions, unless such conditions are required by law. |
Format
Captions
Add a one-line explanation of what this file represents
Items portrayed in this file
depicts
File history
Click on a date/time to view the file as it appeared at that time.
| Date/Time | Thumbnail | Dimensions | User | Comment | |
|---|---|---|---|---|---|
| current | 18:53, 3 June 2010 | No thumbnail | 1,316 × 1,038 (9 KB) | commonswiki>Aiyizo | losslessly converted to 66 color mode. |
File usage
There are no pages that use this file.