[Index for tmp_for_tar/dumper] [Return to Master Index]

list2str

(tmp_for_tar/dumper/list2str.m)


Function Synopsis

s = list2str(mat)		% Convert a cell to a string.

Help text

 s = list2str(mat)            - Convert a list to octave code

 Converts an octave list to a string that evaluates to that list.

  See also any2m, any2str, cmpany, mat2str, struct2str.

 Last modified: August 2001



Listing of function file tmp_for_tar/dumper/list2str.m

## s = list2str(mat)            - Convert a list to octave code
## 
## Converts an octave list to a string that evaluates to that list.
##
##  See also any2m, any2str, cmpany, mat2str, struct2str.


## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: August 2001

function s = list2str(mat)		% Convert a cell to a string.
  
  s = sprintf('list(...\n'); % ) Don't confuse emacs ...
  
  for i = 1:length(mat),
	      
    s = [s,sprintf('  %s ',any2str(nth(mat,i)))];
    
    if i<length(mat) , s = [s,sprintf(',...\n')] ; end
    
  end

  s = [s,sprintf('...\n)')] ;	
endfunction


Produced by oct2html on Tue Aug 7 17:33:07 2001
Cross-Directory links are: ON