Main Content

resetglobalfimath

グローバル fimath を MATLAB 出荷時の既定に設定

構文

resetglobalfimath

説明

resetglobalfimath は、現在の MATLAB® セッションでグローバル fimath を MATLAB 出荷時の既定に設定します。MATLAB 出荷時の既定のプロパティは以下のとおりです。

      RoundingMethod: Nearest
        OverflowAction: Saturate
           ProductMode: FullPrecision
               SumMode: FullPrecision

この例では、独自の fimath オブジェクト F を作成して、グローバル fimath として設定します。次に、resetglobalfimath コマンドを使用して、グローバル fimath を MATLAB 出荷時の既定の設定にリセットします。

F = fimath('RoundingMethod','Floor','OverflowAction','Wrap');
globalfimath(F);
F1 = fimath 
a = fi(pi) 

F1 =
 

        RoundingMethod: Floor
        OverflowAction: Wrap
           ProductMode: FullPrecision
               SumMode: FullPrecision
 
a =
 
    3.1416

          DataTypeMode: Fixed-point: binary point scaling
            Signedness: Signed
            WordLength: 16
        FractionLength: 13

resetglobalfimath を使用して、グローバル fimath を出荷時の既定の設定に戻します。

resetglobalfimath;
F2 = fimath 
a = fi(pi) 

F2 =
 

      RoundingMethod: Nearest
        OverflowAction: Saturate
           ProductMode: FullPrecision
               SumMode: FullPrecision 
a =
 
    3.1416

       DataTypeMode: Fixed-point: binary point scaling
            Signedness: Signed
            WordLength: 16
        FractionLength: 13

現在の MATLAB セッションのグローバル fimath が出荷時の既定の設定に戻されました。今後の MATLAB セッションで出荷時の既定の設定のグローバル fimath を使用するには、removeglobalfimathpref コマンドを使用しなければなりません。

代替方法

reset(G)G がグローバル fimath に対するハンドルである場合、reset(G)resetglobalfimath コマンドを使用することと同じです。

バージョン履歴

R2010a で導入