加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
creat_p_files.m 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
ShiboJiang 提交于 2017-11-29 15:50 . 更新 creat_p_files.m
%------------------------------------------------------------------------------
% Matlab scrip for p file created.
% MATLAB version: R2017a
% Author : Shibo Jiang
% Time : 2017/8/28
% Version : 0.1
% Instructions : Use this scrip and the *.m files which need translating
% to *.p files in the same folder.
%------------------------------------------------------------------------------
%-----Start of creat_p_files---------------------------------------------------
function output = creat_p_files()
% get work floder path
the_path = cd;
% get all files in this floder
files = dir(the_path);
% find the .m files' name
length_all_files = length(files);
select_type = '.m';
for i = 1:length_all_files
current_name = files(i).name;
% protect from wrong state running
try
current_type = current_name(end-1:end);
if 1 == strcmp(select_type,current_type)
% creat .p file
pcode (current_name);
else
% not .m file, do nothing
end
catch
% do nothing
end
end
output = 'Creat P files successful';
end
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化