% ***********************************************************************
% water2.m
% ***********************************************************************
%
% Data description:
% refractive index (real part) of water (200-2500nm), 
% linearly interpolated from original data (resolution of 5nm) 
%
% Prepared by: Bradley W. Kimmel on January 2013
%
% ***********************************************************************
%
% Original data source:
% 
% G.M. Hale and M.R. Querry, Optical Constants of Water in the 200-nm to
% 200-um Wavelength Region, Applied Optics, Vol. 12, No. 3, pp 555-563,
% March 1973.
%
% ***********************************************************************
clear all
data=[
1.3960
1.3914
1.3868
1.3822
1.3776
1.3730
1.3708
1.3686
1.3664
1.3642
1.3620
1.3604
1.3588
1.3572
1.3556
1.3540
1.3530
1.3520
1.3510
1.3500
1.3490
1.3484
1.3478
1.3472
1.3466
1.3460
1.3454
1.3448
1.3442
1.3436
1.3430
1.3426
1.3422
1.3418
1.3414
1.3410
1.3406
1.3402
1.3398
1.3394
1.3390
1.3388
1.3386
1.3384
1.3382
1.3380
1.3378
1.3376
1.3374
1.3372
1.3370
1.3368
1.3366
1.3364
1.3362
1.3360
1.3358
1.3356
1.3354
1.3352
1.3350
1.3348
1.3346
1.3344
1.3342
1.3340
1.3338
1.3336
1.3334
1.3332
1.3330
1.3330
1.3330
1.3330
1.3330
1.3330
1.3328
1.3326
1.3324
1.3322
1.3320
1.3320
1.3320
1.3320
1.3320
1.3320
1.3318
1.3316
1.3314
1.3312
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3310
1.3308
1.3306
1.3304
1.3302
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3300
1.3298
1.3296
1.3294
1.3292
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3290
1.3288
1.3286
1.3284
1.3282
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3280
1.3278
1.3276
1.3274
1.3272
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3270
1.3269
1.3268
1.3268
1.3267
1.3266
1.3265
1.3265
1.3264
1.3263
1.3262
1.3262
1.3261
1.3260
1.3259
1.3259
1.3258
1.3257
1.3256
1.3256
1.3255
1.3254
1.3254
1.3253
1.3252
1.3251
1.3251
1.3250
1.3249
1.3248
1.3248
1.3247
1.3246
1.3245
1.3245
1.3244
1.3243
1.3242
1.3242
1.3241
1.3240
1.3239
1.3238
1.3238
1.3237
1.3236
1.3236
1.3235
1.3234
1.3233
1.3233
1.3232
1.3231
1.3230
1.3230
1.3229
1.3228
1.3227
1.3227
1.3226
1.3225
1.3224
1.3223
1.3223
1.3222
1.3221
1.3220
1.3220
1.3219
1.3218
1.3217
1.3217
1.3216
1.3215
1.3215
1.3214
1.3213
1.3212
1.3212
1.3211
1.3210
1.3209
1.3208
1.3207
1.3206
1.3205
1.3204
1.3203
1.3202
1.3201
1.3200
1.3199
1.3198
1.3197
1.3196
1.3195
1.3194
1.3193
1.3192
1.3191
1.3190
1.3189
1.3188
1.3187
1.3186
1.3185
1.3184
1.3183
1.3182
1.3181
1.3180
1.3179
1.3178
1.3177
1.3176
1.3175
1.3174
1.3173
1.3172
1.3171
1.3170
1.3169
1.3167
1.3166
1.3165
1.3164
1.3162
1.3161
1.3160
1.3159
1.3157
1.3156
1.3155
1.3154
1.3153
1.3151
1.3150
1.3149
1.3148
1.3146
1.3145
1.3144
1.3142
1.3141
1.3140
1.3139
1.3137
1.3136
1.3135
1.3134
1.3133
1.3131
1.3130
1.3129
1.3128
1.3126
1.3125
1.3124
1.3123
1.3121
1.3120
1.3118
1.3117
1.3115
1.3114
1.3113
1.3111
1.3110
1.3108
1.3107
1.3105
1.3104
1.3102
1.3101
1.3099
1.3097
1.3096
1.3095
1.3093
1.3092
1.3090
1.3089
1.3087
1.3086
1.3084
1.3083
1.3081
1.3079
1.3078
1.3076
1.3075
1.3074
1.3072
1.3071
1.3069
1.3068
1.3066
1.3065
1.3063
1.3062
1.3060
1.3057
1.3055
1.3053
1.3050
1.3048
1.3045
1.3043
1.3040
1.3037
1.3035
1.3033
1.3030
1.3028
1.3025
1.3023
1.3020
1.3017
1.3015
1.3013
1.3010
1.3008
1.3005
1.3003
1.3000
1.2997
1.2995
1.2993
1.2990
1.2988
1.2985
1.2983
1.2980
1.2977
1.2975
1.2973
1.2970
1.2968
1.2965
1.2963
1.2960
1.2956
1.2952
1.2947
1.2943
1.2939
1.2934
1.2930
1.2926
1.2922
1.2917
1.2913
1.2909
1.2905
1.2900
1.2896
1.2892
1.2888
1.2883
1.2879
1.2875
1.2871
1.2867
1.2862
1.2858
1.2854
1.2850
1.2845
1.2841
1.2837
1.2833
1.2828
1.2824
1.2820
1.2815
1.2811
1.2807
1.2803
1.2798
1.2794
1.2790
1.2781
1.2772
1.2762
1.2753
1.2744
1.2734
1.2725
1.2716
1.2707
1.2697
1.2688
1.2679
1.2670
1.2660
1.2651
1.2642
1.2633
1.2623
1.2614
1.2605
];

fid=fopen('riW2.txt','wb');
for i=1:461
    wave(i)=195+i*5;
    fprintf(fid,'%d  %3.4g \n',wave(i),data(i));
end
fclose(fid);


plot(wave,data,'b-','linewidth',3);
axis([200 2500 1.2 1.4]);
set(gca,'FontSize', 14);
grid on
title('Water','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','water2_n.png');
close 
   




