test_mc.m
来自「Monte Carlo simulation」· M 代码 · 共 34 行
M
34 行
% test the performance and give an example of the using of MC
clear all;
close all;
clc;
% initialize the input data structure
input= InitializeInput('inputdatafile_1');
% call MC
[output] = MC(input);
%plot reflectance
dr = input.dr;
nr = input.nr;
rd_r = output.rd_r;
log_rd_r = log(rd_r);
rindex = (dr:dr:nr*dr)-dr/2; % This is the way to generate ticks in r direction
figure('name','reflectance')
subplot(2,1,1)
plot(rindex,rd_r)
grid on
title('reflectance')
xlabel('distance[cm]')
ylabel('reflectance')
subplot(2,1,2)
plot(rindex,log_rd_r)
grid on
title('LOG(reflectance)')
xlabel('distance[cm]')
ylabel('LOG(reflectance)')
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?