%TestScript %Example which demonstrates how to call the main functions testOS and %testTS %Type: TestScript at command prompt clear addpath('Utility') %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Example A: One-Sample Problem %1. generate data from multivariate normal distribution data = mvnrnd( 1:1:10, eye(10), 4); %2. Set the inputs to the function %number of samples to use for the Monte-Carlo approximation B = 2000; %size of the test alpha = .05; %norm to use (for sup-norm set to inf) pnorm = inf; %3. Call the function R = testOS(B, data, pnorm, alpha); %display the result display(R) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %Example B: Two-Sample Problem %1. generate data from multivariate normal distribution sigmaX = eye(10); sigmaY = eye(10); dataX = mvnrnd(1:1:10, sigmaX, 4); dataY = mvnrnd(1:1:10, sigmaY, 7); %2. Set the inputs to the function %number of samples to use for the Monte-Carlo approximation B = 2000; %size of the test alpha = .05; %norm to use (for sup-norm set to inf) pnorm = inf; %3. Call the function R = testTS(B, dataX, dataY, pnorm,alpha); %display the result display(R) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%