12.07.2015 Views

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

GNU Octave - Local Sector 7 web page

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

40 <strong>GNU</strong> <strong>Octave</strong>5.1 Creating Stringsblanks (n)Return a string of n blanks.Function Filechar (x)char (cell array)char (s1, s2, ...)Create a string array from a numeric matrix, cell array, or list ofBuilt-in FunctionBuilt-in FunctionBuilt-in FunctionIf the argument is a numeric matrix, each element of the matrix is converted to thecorresponding ASCII character. For example,char ([97, 98, 99])⇒ "abc"If the argument is a cell array of strings, the result is a string array with each elementcorresponding to one element of the cell array.For multiple string arguments, the result is a string array with each element correspondingto the arguments.The returned values are padded with blanks as needed to make each row of the stringarray have the same length.int2str (n)Function Filenum2str (x, precision)Function Filenum2str (x, format)Function FileConvert a number to a string. These functions are not very flexible, but are providedfor compatibility with Matlab. For better control over the results, use sprintf (seeSection 16.2.4 [Formatted Output], <strong>page</strong> 120).com2str (zz, flg)This function has been deprecated. Use num2str instead.Convert complex number to a string. Inputszzcomplex numberFunction Fileflg format flag 0 (default): -1, 0, 1, 1i, 1 + 0.5i 1 (for use with zpout): -1, 0,+ 1, + 1i, + 1 + 0.5istrcat (s1, s2, ...)Return a string containing all the arguments concatenated. For example,s = [ "ab"; "cde" ];strcat (s, s, s)⇒ "ab ab ab ""cdecdecde"Function File

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!