| Last change
 on this file since 13395 was             13395, checked in by Mathieu Morlighem, 13 years ago | 
        
          | 
merged trunk-jpl and trunk for revision 13393
 | 
        
          | File size:
            591 bytes | 
      
      
| Rev | Line |  | 
|---|
| [3094] | 1 | % | 
|---|
|  | 2 | %  function to write a parameter | 
|---|
|  | 3 | % | 
|---|
|  | 4 | function []=param_write(fidi,sbeg,pname,smid,send,params) | 
|---|
|  | 5 |  | 
|---|
|  | 6 | if ~isfield(params,pname) | 
|---|
|  | 7 | warning('param_write:param_not_found',... | 
|---|
|  | 8 | 'Parameter ''%s'' not found in structure.',pname); | 
|---|
|  | 9 | return | 
|---|
|  | 10 | end | 
|---|
|  | 11 |  | 
|---|
|  | 12 | if islogical(params.(pname)) && ~params.(pname) | 
|---|
|  | 13 | return | 
|---|
|  | 14 | end | 
|---|
|  | 15 |  | 
|---|
|  | 16 | if     islogical(params.(pname)) | 
|---|
|  | 17 | fprintf(fidi,[sbeg '%s' send],pname); | 
|---|
|  | 18 | elseif ischar   (params.(pname)) | 
|---|
|  | 19 | fprintf(fidi,[sbeg '%s' smid '%s' send],pname,params.(pname)); | 
|---|
|  | 20 | elseif isnumeric(params.(pname)) | 
|---|
|  | 21 | fprintf(fidi,[sbeg '%s' smid '%g' send],pname,params.(pname)); | 
|---|
|  | 22 | end | 
|---|
|  | 23 |  | 
|---|
|  | 24 | end | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.