popstr.m

来自「A MATLAB tool for analysis of Transient 」· M 代码 · 共 34 行

M
34
字号
function [str, Files, dtaPath] = popstr(dire)

%popstr    sets popupmenu string in GUI created by ILO.M
%
%     [str, Files, dtaPath] = popstr(dire)
%
%   in: dire    directory to read from (none gives uigetfile)
%
%  out: str     string matrix ([num names ears dates])
%       Files   names of all dta-files (string matrix)
%       dtaPath    path of file location


% Pekka Kumpulainen 25.5.1993

[Files,Names,Ear,Date,dtaPath] = rdpat;

[MNames,NNames] = size(Names);
[MEar,NEar] = size(Ear);
[MDate,NDate] = size(Date);
% TEE TARKISTUS, ONKO KAIKKI SAMAN KOKOISIA

% create string for popup-menu
vm = ', '; p = '.';
lline = NNames+NEar+NDate+2*length(vm);

popstring = [];
for ii=1:MNames;
    popstring = str2mat(popstring,[sprintf('%3g',ii) '. ' Names(ii,:) vm Ear(ii,:) vm Date(ii,:)]);
end

str = popstring(2:(MNames+1),:);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?