Parent Directory
|
Revision Log
|
Revision Graph
matlab_class core routine: gcmfaces methods
| 1 | gforget | 1.1 | function a = mk3D(b,c) |
| 2 | |||
| 3 | a=c; | ||
| 4 | |||
| 5 | if isa(b,'gcmfaces'); | ||
| 6 | %go from 2D field to 3D field | ||
| 7 | for kk=1:size(a.f1,3) | ||
| 8 | for iFace=1:a.nFaces; | ||
| 9 | iF=num2str(iFace); | ||
| 10 | eval(['a.f' iF '(:,:,kk)=b.f' iF '(:,:);']); | ||
| 11 | end; | ||
| 12 | end; | ||
| 13 | elseif isa(b,'double'); | ||
| 14 | for kk=1:size(a.f1,3) | ||
| 15 | for iFace=1:a.nFaces; | ||
| 16 | iF=num2str(iFace); | ||
| 17 | eval(['a.f' iF '(:,:,kk)=b(kk);']); | ||
| 18 | end; | ||
| 19 | end; | ||
| 20 | else | ||
| 21 | error('indexing not supported by gcmfaces objects') | ||
| 22 | end | ||
| 23 | |||
| 24 |
| ViewVC Help | |
| Powered by ViewVC 1.1.22 |