Cody

# Problem 685. Image Processing 2.1.1 Planck Integral

Solution 350221

Submitted on 13 Nov 2013 by Alfonso Nieto-Castanon
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% % Input: BB Temp, Lo Wavelength, Hi Wavelength, Integration steps % Output radiance in ph/m2/sec/ster % Nominal steps of 1000 yields accuracy and timeliness lo=3.0; hi=5.0; T=250.0; % Radiance = 4.96124998 e18 ph/m2/sec/ster ts=cputime; rad_entry=Calc_Radiance(lo,hi,T) tc=cputime; dt=1000*(tc-ts) % Processing Time in ms rad_correct = 4.96124998e18; % ph/m2/sec/ster tol=.00001; Pass=rad_entry>rad_correct*(1- tol) & rad_entry<rad_correct*(1+ tol) & dt<100; assert(isequal(Pass,1))

rad_entry = 4.9612e+18 dt = 20.0000

2   Pass
%% % Input: BB Temp, Lo Wavelength, Hi Wavelength, Integration steps % Output radiance in ph/m2/sec/ster % Nominal steps of 1000 yields accuracy and timeliness lo=3.0; hi=5.0; T=300.0; % Radiance = 4.1826971 e19 ph/m2/sec/ster ts=cputime; rad_entry=Calc_Radiance(lo,hi,T) tc=cputime; dt=1000*(tc-ts) % Processing Time in ms rad_correct = 4.1826971e19; % ph/m2/sec/ster tol=.00001; Pass=rad_entry>rad_correct*(1- tol) & rad_entry<rad_correct*(1+ tol) & dt<100; assert(isequal(Pass,1))

rad_entry = 4.1827e+19 dt = 10.0000

3   Pass
%% % Input: BB Temp, Lo Wavelength, Hi Wavelength, Integration steps % Output radiance in ph/m2/sec/ster % Nominal steps of 1000 yields accuracy and timeliness lo=8.0; hi=12.0; T=280.0; % Radiance = 1.37122128 e21 ph/m2/sec/ster ts=cputime; rad_entry=Calc_Radiance(lo,hi,T) tc=cputime; dt=1000*(tc-ts) % Processing Time in ms rad_correct = 1.37122128e21; % ph/m2/sec/ster tol=.00001; Pass=rad_entry>rad_correct*(1- tol) & rad_entry<rad_correct*(1+ tol) & dt<100; assert(isequal(Pass,1))

rad_entry = 1.3712e+21 dt = 0

4   Pass