www.gusucode.com > robust 案例源码程序 matlab代码 > robust/SampleRealParameterExample.m
%% Sample Real Parameter % Create a real uncertain parameter, sample it, and plot a histogram of the % sampled values. %% % Copyright 2015 The MathWorks, Inc. A = ureal('A',5); Asample = usample(A,500); %% % Examine the size of the parameter and the sample array. size(A) %% size(Asample) %% % |A| is a scalar parameter. The dimensions of |Asample| reflect that |A| % is a 1-by-1 parameter. % Examine the data type of |Asample|. class(Asample) %% % The samples of the scalar parameter are numerical values. % % Plot the histogram of sampled values. hist(Asample(:))