Changeset 3564
- Timestamp:
- 04/16/10 15:51:59 (15 years ago)
- Location:
- issm/trunk/src/m/solutions/dakota
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/solutions/dakota/dakota_in_data.m
r2161 r3564 133 133 134 134 %Write in file 135 dakota_in_write(dmeth .method,dmeth,dvar,dresp,params,filei,varargin{:});135 dakota_in_write(dmeth,dvar,dresp,params,filei,varargin{:}); 136 136 137 137 end -
issm/trunk/src/m/solutions/dakota/dakota_out_parse.m
r3092 r3564 66 66 fline=fgetl(fidi); 67 67 if ~ischar(fline) 68 ieof=1;69 68 error('File ''%s'' is empty.',filei); 70 69 end … … 366 365 display('Reading CDF''s for response functions:'); 367 366 368 while ~isempty(fline)367 while ischar(fline) && ~isempty(fline) 369 368 fline=fgetl(fidi); 370 369 if ~ischar(fline) … … 374 373 % process header line of cdf 375 374 376 while ~isempty(fline)375 while ischar(fline) && ~isempty(fline) 377 376 [ntokens,tokens]=fltokens(fline); 378 377 … … 401 400 fline=fgetl(fidi); 402 401 icdf=0; 403 while ~isempty(fline) && ...402 while ischar(fline) && ~isempty(fline) && ... 404 403 ~strncmpi(fline,'Cumulative Distribution Function',32) 405 404 [ntokens,tokens]=fltokens(fline); … … 493 492 end 494 493 495 ieof=0;496 494 display('Reading MV statistics for response functions:'); 497 495 ndresp=0; 498 496 499 while ~ieof&& ~isempty(fline) && ...497 while ischar(fline) && ~isempty(fline) && ... 500 498 strncmpi(fline,'MV Statistics for ',18) 501 499 … … 517 515 fline=fgetl(fidi); 518 516 if ~ischar(fline) 519 ieof=1;520 517 break; 521 518 end 522 519 523 while ~ieof&& ~isempty(fline) && ...520 while ischar(fline) && ~isempty(fline) && ... 524 521 strncmpi(fline,' Importance Factor for variable ',33) 525 522 [ntokens,tokens]=fltokens(fline); … … 529 526 530 527 fline=fgetl(fidi); 531 if ~ischar(fline)532 ieof=1;533 break;534 end535 528 end 536 529 … … 541 534 dresp(end).var ={}; 542 535 dresp(end).impfac=[]; 543 while ~ieof&& ...536 while ischar(fline) && ... 544 537 ~strncmpi(fline,'Cumulative Distribution Function',32) && ... 545 538 ~strncmpi(fline,'MV Statistics for ',18) && ... 546 539 ~strncmp (fline,'-',1) 547 540 fline=fgetl(fidi); 548 if ~ischar(fline)549 ieof=1;550 break;551 end552 541 end 553 542 end … … 557 546 icdf=0; 558 547 559 while ~ieof&& ~isempty(fline) && ...548 while ischar(fline) && ~isempty(fline) && ... 560 549 strncmpi(fline,'Cumulative Distribution Function',32) 561 550 [ntokens,tokens]=fltokens(fline); … … 607 596 display(' Cumulative Distribution Function not available.'); 608 597 dresp(ndresp).cdf=[]; 609 while ~ieof&& ...598 while ischar(fline) && ... 610 599 ~strncmpi(fline,'MV Statistics for ',18) && ... 611 600 ~strncmp (fline,'-',1) 612 601 fline=fgetl(fidi); 613 if ~ischar(fline)614 ieof=1;615 break;616 end617 602 end 618 603 end
Note:
See TracChangeset
for help on using the changeset viewer.