Main Content

tostring

fi, fimath, numerictype 또는 quantizer 객체를 문자열로 변환

설명

예제

s = tostring(a)eval(s)a와 동일한 속성을 갖는 fi 객체를 만들도록 fi 객체 a를 문자형 벡터 s로 변환합니다.

예제

s = tostring(F)eval(s)F와 동일한 속성을 갖는 fimath 객체를 만들도록 fimath 객체 F를 문자형 벡터 s로 변환합니다.

예제

s = tostring(T)eval(s)T와 동일한 속성을 갖는 numerictype 객체를 만들도록 numerictype 객체 T를 문자형 벡터 s로 변환합니다.

예제

s = tostring(q)eval(s)q와 동일한 속성을 갖는 quantizer 객체를 만들도록 quantizer 객체 q를 문자형 벡터 s로 변환합니다.

예제

모두 축소

a = fi(pi,1,16,10);
s = tostring(a)
a1 = eval(s)
isequal(a,a1)
s =

    'fi('numerictype',numerictype(1,16,10),'Value','3.1416015625')'


a1 = 

    3.1416

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

ans =

  logical

   1
F = fimath('OverflowAction','Saturate','RoundingMethod','Convergent');
s = tostring(F)
F1 = eval(s)
isequal(F,F1)
s =

    'fimath('RoundingMethod', 'Convergent',...
     'OverflowAction', 'Saturate',...
     'ProductMode','FullPrecision',...
     'SumMode','FullPrecision')'


F1 = 


        RoundingMethod: Convergent
        OverflowAction: Saturate
           ProductMode: FullPrecision
               SumMode: FullPrecision

ans =

  logical

   1
T = numerictype(1,16,15);
s = tostring(T)
T1 = eval(s)
isequal(T,T1)
s =

    'numerictype(1,16,15)'


T1 =


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

ans =

  logical

   1
q = quantizer('fixed','Ceiling','Saturate',[5 4]);
s = tostring(q)
q1 = eval(s)
isequal(q,q1)
s =

    'quantizer('fixed', 'ceil', 'saturate', [5  4])'


q1 =


        DataMode = fixed
       RoundMode = ceil
    OverflowMode = saturate
          Format = [5  4]

ans =

  logical

   1

입력 인수

모두 축소

입력 fi 객체.

데이터형: fi
복소수 지원 여부:

입력 fimath 객체.

입력 numerictype 객체.

입력 quantizer 객체.

버전 내역

R2006a 이전에 개발됨

참고 항목

| | | |