This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

tostring

Convert numerictype or quantizer object to string

Syntax

s = tostring(f)
s = tostring(F)
s = tostring(T)
s = tostring(q)

Description

s = tostring(f) converts fi object f to a character vector s such that eval(s) would create a fi object with the same properties as f.

s = tostring(F) converts fimath object F to a character vector s such that eval(s) would create a fimath object with the same properties as F.

s = tostring(T) converts numerictype object T to a character vector s such that eval(s) would create a numerictype object with the same properties as T.

s = tostring(q) converts quantizer object q to a character vector s. After converting q, the function eval(s) can use s to create a quantizer object with the same properties as q.

Examples

Convert a numerictype Object to a String

This example uses the tostring function to convert a numerictype object T to a string s.

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

     1

Convert a fi Object to a character vector

This example uses the tostring function to convert a fi object f to a character vector s.

f = fi(pi,1,16,10);
s = tostring(f);
f1 = eval(s);
isequal(f,f1)
ans =

     1

Introduced before R2006a