Home > matlab > misc > sopt_mltb_genmask.m

sopt_mltb_genmask

PURPOSE ^

sopt_mltb_genmask - Generate mask

SYNOPSIS ^

function mask = sopt_mltb_genmask(pdf, seed)

DESCRIPTION ^

 sopt_mltb_genmask - Generate mask

 Generate a binary mask with variable density sampling. It is used
 in sopt_mltb_vdsmask in the generation of variable density sampling
 profiles.

 Inputs:

   - pdf: Sampling profile function.

   - seed: Seed for the random number generator. Optional.

 Outputs:

   - mask: Binary mask.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function mask = sopt_mltb_genmask(pdf, seed)
0002 % sopt_mltb_genmask - Generate mask
0003 %
0004 % Generate a binary mask with variable density sampling. It is used
0005 % in sopt_mltb_vdsmask in the generation of variable density sampling
0006 % profiles.
0007 %
0008 % Inputs:
0009 %
0010 %   - pdf: Sampling profile function.
0011 %
0012 %   - seed: Seed for the random number generator. Optional.
0013 %
0014 % Outputs:
0015 %
0016 %   - mask: Binary mask.
0017 
0018 if nargin==2
0019     rand('seed', seed);
0020 end
0021 
0022 mask = rand(size(pdf))<pdf;
0023

Generated on Fri 22-Feb-2013 15:54:47 by m2html © 2005