www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/IntegerFormatwithFloatingPointInputsExample.m

    %% Integer Format with Floating-Point Inputs  
% Explicitly convert double-precision values to integers.   

% Copyright 2015 The MathWorks, Inc.


%%  
str = sprintf('%d',round(pi))