www.gusucode.com > fixedpoint 案例源码程序 matlab代码 > fixedpoint/SquareArrayofOnesWithFixedPointAttributesExample.m
%% Square Array of Ones With Fixed-Point Attributes % Create a 4-by-4 array of ones with specified numerictype and |fimath| % properties. %% % Create a signed |fi| object with word length of |24| and fraction length % of |12|. p = fi([],1,24,12); %% % Create a 4-by-4 array of ones that has the same numerictype properties % as |p|. X = ones(4, 'like', p)