% ***********************************************************************
% magnetite_n.m
% ***********************************************************************
%
% Data description:
% refractive index (real part) of magnetite (310-1230nm), 
% interpolated from original data (resolution of 1nm) 
%
% Prepared by: Bradley W. Kimmel on June 2009
%
% ***********************************************************************
%
% Original data source:
% 
% A. Schlegel, S.F. Alvarado, and P. Wachter, Optical properties of
% magnetite (Fe3O4), Journal of Physics C: Solid State Physics,
% 12:1157-1164, 1979.
%
% ***********************************************************************
clear all;
data = [...
	2.1026, 2.1035, 2.1044, 2.1053, 2.1062, ...
	2.1072, 2.1083, 2.1094, 2.1106, 2.1117, ...
	2.1126, 2.1135, 2.1144, 2.1154, 2.1163, ...
	2.1172, 2.1181, 2.1191, 2.1200, 2.1209, ...
	2.1219, 2.1228, 2.1237, 2.1248, 2.1276, ...
	2.1304, 2.1335, 2.1368, 2.1401, 2.1434, ...
	2.1467, 2.1499, 2.1531, 2.1563, 2.1595, ...
	2.1627, 2.1659, 2.1690, 2.1722, 2.1755, ...
	2.1788, 2.1818, 2.1847, 2.1877, 2.1906, ...
	2.1918, 2.1926, 2.1934, 2.1942, 2.1948, ...
	2.1951, 2.1954, 2.1958, 2.1963, 2.1969, ...
	2.1974, 2.1980, 2.1991, 2.2002, 2.2013, ...
	2.2024, 2.2035, 2.2046, 2.2057, 2.2068, ...
	2.2079, 2.2100, 2.2123, 2.2146, 2.2169, ...
	2.2192, 2.2215, 2.2228, 2.2227, 2.2227, ...
	2.2227, 2.2232, 2.2237, 2.2243, 2.2249, ...
	2.2255, 2.2260, 2.2266, 2.2272, 2.2278, ...
	2.2284, 2.2290, 2.2296, 2.2309, 2.2321, ...
	2.2333, 2.2346, 2.2358, 2.2371, 2.2383, ...
	2.2395, 2.2408, 2.2420, 2.2431, 2.2431, ...
	2.2431, 2.2431, 2.2423, 2.2400, 2.2376, ...
	2.2353, 2.2330, 2.2307, 2.2284, 2.2261, ...
	2.2257, 2.2267, 2.2277, 2.2287, 2.2297, ...
	2.2307, 2.2317, 2.2327, 2.2329, 2.2322, ...
	2.2315, 2.2307, 2.2287, 2.2238, 2.2189, ...
	2.2140, 2.2092, 2.2052, 2.2013, 2.2003, ...
	2.1997, 2.1983, 2.1966, 2.1951, 2.1938, ...
	2.1924, 2.1911, 2.1897, 2.1884, 2.1870, ...
	2.1857, 2.1843, 2.1830, 2.1816, 2.1802, ...
	2.1789, 2.1775, 2.1762, 2.1748, 2.1739, ...
	2.1735, 2.1732, 2.1731, 2.1729, 2.1728, ...
	2.1726, 2.1725, 2.1723, 2.1722, 2.1720, ...
	2.1719, 2.1717, 2.1716, 2.1715, 2.1713, ...
	2.1712, 2.1710, 2.1709, 2.1707, 2.1706, ...
	2.1704, 2.1703, 2.1701, 2.1700, 2.1699, ...
	2.1697, 2.1696, 2.1694, 2.1693, 2.1692, ...
	2.1692, 2.1692, 2.1692, 2.1691, 2.1691, ...
	2.1691, 2.1691, 2.1691, 2.1691, 2.1690, ...
	2.1690, 2.1690, 2.1690, 2.1690, 2.1690, ...
	2.1690, 2.1689, 2.1689, 2.1689, 2.1689, ...
	2.1689, 2.1689, 2.1689, 2.1689, 2.1688, ...
	2.1688, 2.1688, 2.1688, 2.1688, 2.1688, ...
	2.1688, 2.1688, 2.1688, 2.1688, 2.1688, ...
	2.1688, 2.1688, 2.1687, 2.1687, 2.1687, ...
	2.1687, 2.1687, 2.1687, 2.1687, 2.1684, ...
	2.1682, 2.1679, 2.1677, 2.1674, 2.1672, ...
	2.1669, 2.1667, 2.1665, 2.1662, 2.1660, ...
	2.1657, 2.1655, 2.1652, 2.1650, 2.1647, ...
	2.1645, 2.1642, 2.1640, 2.1638, 2.1635, ...
	2.1633, 2.1630, 2.1628, 2.1626, 2.1623, ...
	2.1621, 2.1618, 2.1616, 2.1614, 2.1611, ...
	2.1609, 2.1607, 2.1604, 2.1597, 2.1589, ...
	2.1582, 2.1575, 2.1567, 2.1560, 2.1553, ...
	2.1545, 2.1538, 2.1531, 2.1523, 2.1516, ...
	2.1509, 2.1501, 2.1494, 2.1487, 2.1480, ...
	2.1472, 2.1469, 2.1472, 2.1476, 2.1480, ...
	2.1484, 2.1488, 2.1492, 2.1496, 2.1500, ...
	2.1504, 2.1508, 2.1512, 2.1515, 2.1519, ...
	2.1523, 2.1527, 2.1531, 2.1535, 2.1539, ...
	2.1543, 2.1547, 2.1551, 2.1555, 2.1558, ...
	2.1562, 2.1566, 2.1570, 2.1574, 2.1578, ...
	2.1582, 2.1586, 2.1590, 2.1594, 2.1596, ...
	2.1598, 2.1600, 2.1601, 2.1603, 2.1605, ...
	2.1607, 2.1608, 2.1610, 2.1612, 2.1614, ...
	2.1615, 2.1617, 2.1618, 2.1620, 2.1621, ...
	2.1622, 2.1623, 2.1625, 2.1626, 2.1627, ...
	2.1629, 2.1630, 2.1631, 2.1633, 2.1634, ...
	2.1635, 2.1636, 2.1638, 2.1639, 2.1640, ...
	2.1642, 2.1637, 2.1632, 2.1628, 2.1623, ...
	2.1618, 2.1613, 2.1609, 2.1604, 2.1599, ...
	2.1595, 2.1590, 2.1585, 2.1580, 2.1576, ...
	2.1571, 2.1566, 2.1562, 2.1557, 2.1552, ...
	2.1545, 2.1539, 2.1533, 2.1527, 2.1520, ...
	2.1513, 2.1503, 2.1492, 2.1482, 2.1471, ...
	2.1460, 2.1450, 2.1439, 2.1429, 2.1418, ...
	2.1407, 2.1397, 2.1386, 2.1376, 2.1365, ...
	2.1355, 2.1344, 2.1333, 2.1323, 2.1312, ...
	2.1302, 2.1291, 2.1281, 2.1270, 2.1260, ...
	2.1249, 2.1239, 2.1229, 2.1222, 2.1215, ...
	2.1208, 2.1200, 2.1193, 2.1186, 2.1179, ...
	2.1172, 2.1164, 2.1157, 2.1150, 2.1143, ...
	2.1136, 2.1128, 2.1121, 2.1112, 2.1102, ...
	2.1092, 2.1082, 2.1072, 2.1063, 2.1053, ...
	2.1043, 2.1033, 2.1023, 2.1013, 2.1004, ...
	2.0994, 2.0985, 2.0979, 2.0973, 2.0967, ...
	2.0961, 2.0955, 2.0949, 2.0943, 2.0937, ...
	2.0931, 2.0925, 2.0919, 2.0912, 2.0906, ...
	2.0900, 2.0894, 2.0888, 2.0882, 2.0876, ...
	2.0870, 2.0864, 2.0858, 2.0852, 2.0845, ...
	2.0839, 2.0833, 2.0827, 2.0821, 2.0815, ...
	2.0809, 2.0803, 2.0797, 2.0791, 2.0784, ...
	2.0778, 2.0772, 2.0766, 2.0760, 2.0754, ...
	2.0748, 2.0742, 2.0736, 2.0730, 2.0723, ...
	2.0717, 2.0711, 2.0705, 2.0699, 2.0693, ...
	2.0687, 2.0681, 2.0675, 2.0669, 2.0662, ...
	2.0656, 2.0650, 2.0644, 2.0633, 2.0621, ...
	2.0610, 2.0599, 2.0588, 2.0576, 2.0565, ...
	2.0554, 2.0542, 2.0531, 2.0520, 2.0508, ...
	2.0497, 2.0486, 2.0474, 2.0463, 2.0450, ...
	2.0433, 2.0417, 2.0401, 2.0384, 2.0368, ...
	2.0352, 2.0335, 2.0319, 2.0303, 2.0286, ...
	2.0270, 2.0254, 2.0237, 2.0221, 2.0204, ...
	2.0188, 2.0171, 2.0155, 2.0138, 2.0122, ...
	2.0105, 2.0089, 2.0075, 2.0062, 2.0048, ...
	2.0035, 2.0021, 2.0008, 1.9995, 1.9981, ...
	1.9968, 1.9954, 1.9941, 1.9927, 1.9914, ...
	1.9900, 1.9887, 1.9873, 1.9860, 1.9846, ...
	1.9833, 1.9819, 1.9806, 1.9792, 1.9778, ...
	1.9765, 1.9751, 1.9738, 1.9724, 1.9710, ...
	1.9697, 1.9683, 1.9670, 1.9656, 1.9647, ...
	1.9641, 1.9634, 1.9627, 1.9620, 1.9613, ...
	1.9606, 1.9599, 1.9592, 1.9585, 1.9579, ...
	1.9572, 1.9565, 1.9558, 1.9551, 1.9544, ...
	1.9537, 1.9530, 1.9523, 1.9516, 1.9510, ...
	1.9503, 1.9496, 1.9490, 1.9484, 1.9478, ...
	1.9472, 1.9467, 1.9461, 1.9455, 1.9449, ...
	1.9443, 1.9438, 1.9432, 1.9426, 1.9420, ...
	1.9414, 1.9409, 1.9403, 1.9397, 1.9391, ...
	1.9385, 1.9380, 1.9374, 1.9373, 1.9372, ...
	1.9371, 1.9369, 1.9368, 1.9367, 1.9366, ...
	1.9364, 1.9363, 1.9362, 1.9361, 1.9359, ...
	1.9358, 1.9357, 1.9356, 1.9355, 1.9353, ...
	1.9352, 1.9351, 1.9350, 1.9348, 1.9347, ...
	1.9346, 1.9345, 1.9344, 1.9343, 1.9341, ...
	1.9340, 1.9339, 1.9338, 1.9337, 1.9336, ...
	1.9334, 1.9333, 1.9332, 1.9331, 1.9330, ...
	1.9329, 1.9329, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9328, ...
	1.9328, 1.9328, 1.9328, 1.9328, 1.9329, ...
	1.9331, 1.9333, 1.9335, 1.9337, 1.9339, ...
	1.9341, 1.9343, 1.9345, 1.9347, 1.9349, ...
	1.9351, 1.9353, 1.9355, 1.9358, 1.9363, ...
	1.9367, 1.9371, 1.9375, 1.9379, 1.9383, ...
	1.9387, 1.9391, 1.9395, 1.9399, 1.9403, ...
	1.9408, 1.9412, 1.9416, 1.9420, 1.9424, ...
	1.9428, 1.9432, 1.9437, 1.9441, 1.9445, ...
	1.9449, 1.9453, 1.9457, 1.9462, 1.9466, ...
	1.9470, 1.9474, 1.9478, 1.9482, 1.9487, ...
	1.9491, 1.9495, 1.9499, 1.9503, 1.9508, ...
	1.9512, 1.9516, 1.9520, 1.9525, 1.9529, ...
	1.9533, 1.9537, 1.9542, 1.9546, 1.9550, ...
	1.9554, 1.9559, 1.9563, 1.9567, 1.9571, ...
	1.9576, 1.9580, 1.9584, 1.9589, 1.9593, ...
	1.9597, 1.9602, 1.9606, 1.9611, 1.9616, ...
	1.9621, 1.9625, 1.9630, 1.9635, 1.9640, ...
	1.9645, 1.9650, 1.9654, 1.9659, 1.9664, ...
	1.9669, 1.9674, 1.9679, 1.9683, 1.9688, ...
	1.9693, 1.9698, 1.9703, 1.9708, 1.9713, ...
	1.9719, 1.9726, 1.9732, 1.9739, 1.9745, ...
	1.9752, 1.9758, 1.9765, 1.9772, 1.9778, ...
	1.9785, 1.9791, 1.9798, 1.9804, 1.9811, ...
	1.9817, 1.9824, 1.9830, 1.9837, 1.9844, ...
	1.9850, 1.9857, 1.9863, 1.9870, 1.9876, ...
	1.9883, 1.9889, 1.9896, 1.9903, 1.9909, ...
	1.9916, 1.9922, 1.9929, 1.9935, 1.9942, ...
	1.9949, 1.9955, 1.9962, 1.9968, 1.9975, ...
	1.9981, 1.9988, 1.9995, 2.0001, 2.0008, ...
	2.0014, 2.0021, 2.0027, 2.0034, 2.0041, ...
	2.0047, 2.0054, 2.0060, 2.0067, 2.0074, ...
	2.0080, 2.0087, 2.0094, 2.0102, 2.0109, ...
	2.0116, 2.0124, 2.0131, 2.0138, 2.0146, ...
	2.0153, 2.0160, 2.0167, 2.0175, 2.0182, ...
	2.0189, 2.0197, 2.0204, 2.0211, 2.0219, ...
	2.0226, 2.0233, 2.0241, 2.0248, 2.0255, ...
	2.0263, 2.0270, 2.0277, 2.0285, 2.0292, ...
	2.0299, 2.0307, 2.0314, 2.0321, 2.0329, ...
	2.0336, 2.0343, 2.0351, 2.0358, 2.0365, ...
	2.0373, 2.0380, 2.0387, 2.0395, 2.0402, ...
	2.0409, 2.0417, 2.0424, 2.0431, 2.0439, ...
	2.0446, 2.0454, 2.0461, 2.0468, 2.0476, ...
	2.0483, 2.0490, 2.0498, 2.0505, 2.0512, ...
	2.0520, 2.0527, 2.0534, 2.0542, 2.0549, ...
	2.0557, 2.0564, 2.0571, 2.0579, 2.0586, ...
	2.0593, 2.0601, 2.0608, 2.0616, 2.0623, ...
	2.0630, 2.0638, 2.0645, 2.0652, 2.0660, ...
	2.0667, 2.0675, 2.0682, 2.0689, 2.0697, ...
	2.0704, 2.0712, 2.0719, 2.0726, 2.0734, ...
	2.0741, 2.0748, 2.0756, 2.0763, 2.0771, ...
	2.0778, 2.0785, 2.0793, 2.0800, 2.0808, ...
	2.0815 ...
];

fid = fopen('riMag.txt', 'wb');
for i = 1:921
	wave(i) = 309 + i;
	fprintf(fid, '%d  %3.4g \n', wave(i), data(i));
end;
fclose(fid);

plot(wave, data, 'b-', 'linewidth', 3);
axis([310 1230 1.9 2.3]);
set(gca, 'YTick', 1.9:0.1:2.3);
set(gca, 'FontSize', 14);
grid on;
title('Magnetite', 'FontSize', 14);
ylabel('refractive index', 'FontSize', 14);
xlabel('wavelength (nm)', 'FontSize', 14);
set(gcf,'PaperUnits','inches','PaperPosition',[0 0 6 5]);
pause;
print('-dpng', '-r100', 'magnetite_n.png');
close;

