📄 f_cp_tr.m
字号:
function Cp_tr = F_Cp_tr(dir,Ntaps,Npoints)
global flnCp
% This function loads the pressure coefficient time series
%%%%%%%%%%% Pressure coefficient time series: flnCp, Page 2, [Ntaps x Npoints] %%%%%%%%%%%
% Load 'flnCp' and check for errors
flnCpx = ([flnCp(1:end-3)]);
if dir<10
dir3 = ['00' num2str(dir)];
else if dir<100
dir3 = ['0' num2str(dir)];
else
dir3 = num2str(dir);
end; end
clear fid; fid=fopen([flnCpx dir3 '.mat']);
if fid == -1
errordlg('Unable to open ''flnCp'' - Page 2')
error ('Unable to open ''flnCp'' - Page 2')
end
fclose(fid); clear fid;
[Cp_tr]=[];
load ([flnCpx dir3]);
s = who('Cp*');
eval(['Cp_tr = ' s{1} ';']);
if size(Cp_tr,1) == Npoints
Cp_tr = Cp_tr';
end
if isempty(Cp_tr)==1
errordlg(['Variable ''Cp_tr'' not defined for direction ' dir3 ' degrees. See flnCp '...
'on Page Two'])
error (['Variable ''Cp_tr'' not defined for direction ' dir3 ' degrees. See flnCp '...
'on Page Two'])
end
if size(Cp_tr,1) ~= Ntaps | size(Cp_tr,2) ~= Npoints
errordlg(['Variable ''Cp_tr'' not properly sized for direction ' dir3 ' degrees. '...
'(Ntaps x Npoints)'])
error (['Variable ''Cp_tr'' not properly sized for direction ' dir3 ' degrees. '...
'(Ntaps x Npoints'])
end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -