MATLAB 读取文件数据(txt)

 

读取txt数据,如下

0.05	0.5	0
0.1	0.431122449	7.79187E-05
0.15	0.367346939	0.00088155
0.2	0.308673469	0.003643898
0.25	0.255102041	0.009973597
0.3	0.206632653	0.021778947
0.35	0.163265306	0.041226004
0.4	0.125	                0.070710678
0.45	0.091836735	0.112838373
0.5	0.06377551	0.170408261
0.55	0.040816327	0.246400657
0.6	0.022959184	0.343966589
0.65	0.010204082	0.466418989
0.7	0.00255102	0.617225123
0.75	0	                0.8

 打开txt文件代码:

[FileName,PathName] =uigetfile('*.txt','Select the M-file');
'file = fullfile(PathName,FileName);';...
    'data = load(file),';

读取txt数据 

data_well = importdata(FileName)

 

你可能感兴趣的:(MATLAB记录)