matlab GUI读取G代码在Edit,多行显示显示
2015-10-26 15:28
337 查看
在perprosprity 里面::设置max min,可以进行对行显示
否则和消失。
按钮点击打开文件:
然后再edit显示出代码
[filename pathname]=uigetfile({'*.txt','txt-file(*.txt)';'*.*','All the files(*.*)'},'Choose a file');
if isequal(filename,0)||isequal(pathname,0);
h=msgbox ('Please choose a file!','Warning','warn');
return;
else
% [FileName,PathName] = uigetfile('*.KGF','Select the Data file');
path2=fullfile(pathname,filename)
fidin=fopen(path2); %打开文件
if ~feof(fidin)
tline=fgetl(fidin);
str=[tline,10]
end
while ~feof(fidin)
tline=fgetl(fidin);
str1=[tline,10]
str=[str,str1]
end
set(handles.editCode,'string',str1)
否则和消失。
按钮点击打开文件:
然后再edit显示出代码
[filename pathname]=uigetfile({'*.txt','txt-file(*.txt)';'*.*','All the files(*.*)'},'Choose a file');
if isequal(filename,0)||isequal(pathname,0);
h=msgbox ('Please choose a file!','Warning','warn');
return;
else
% [FileName,PathName] = uigetfile('*.KGF','Select the Data file');
path2=fullfile(pathname,filename)
fidin=fopen(path2); %打开文件
if ~feof(fidin)
tline=fgetl(fidin);
str=[tline,10]
end
while ~feof(fidin)
tline=fgetl(fidin);
str1=[tline,10]
str=[str,str1]
end
set(handles.editCode,'string',str1)
相关文章推荐
- ubuntu下安装matlab2014b
- Matlab中自带地图绘制WorldMap详解
- MATLAB杂记
- scala调用matlab方法传参和接收返回数据
- MATLAB 生成数据保存至文件
- Ubuntu12.04 64bit 安装matlab2012a+Github
- matlab 2014a的入门学习(1)周总结
- 解决error C2065: 'mwSize' : undeclared identifier
- 解决"Matlab里光标不能显示"问题
- matlab实现RBF的相关函数
- 基于RBF简单的matlab手写识别
- matlab与c++混合编程
- matlab R2014a添加路径
- 图像处理函数详解——imadjust
- matlab实现线性对比度展宽
- MATLAB新的统计数据类型Table
- 基于j2ee+matlab的尝试
- Matlab中的高斯卷积滤波矩阵
- matlab的plot
- matlab 读多个文件夹(有名字规律)中的文件名字保存到txt中