Skip to content
Snippets Groups Projects
Commit dfd25f4a authored by Olivier Sauter's avatar Olivier Sauter
Browse files

needed to adapt EQI etc time bases

git-svn-id: https://spcsvn.epfl.ch/repos/TCV/gdat/trunk@4470 d63d8f72-b253-0410-a779-e742ad2e26cf
parent a96c27fe
No related branches found
No related tags found
No related merge requests found
function [nodeout]=adaptPFM_rda(nodein,ndim1,ndim2,ndim3);
%
% 3D case is special
%
% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2 and same for ndim3
%
% re-generate .x and .t
%
% change .value, .data, .x and .t
%
nodeout = nodein;
nodeout.value = nodeout.value(1:ndim1,1:ndim2,1:ndim3);
nodeout.data = nodeout.value;
nodeout.x = [1:ndim1];
nodeout.t = [1:ndim3];
function [nodeout]=adapt_rda(nodein,ndim1,ndim2,itotransposeback,varargin);
%
% adapt nodein to keep only 1st ndim1 points in dim1 and ndim2 points in dim2
% if itotransposeback==1, transpose back matrix and use ndim1 for ndim2 and vice versa
%
% change .value, .data, .x and .t
%
nodeout = nodein;
if itotransposeback==1
nodeout.value = nodeout.value';
nodeout.data = nodeout.data';
temp = nodeout.x;
nodeout.x = nodeout.t;
nodeout.t = temp;
end
nodeout.value = nodeout.value(1:ndim1,1:ndim2);
nodeout.data = nodeout.value;
nodeout.x = nodeout.x(1:ndim1);
nodeout.t = nodeout.t(1:ndim2);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment