importing .las data as table for analysis.
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시
0 개 추천
Dear all, I am using Matlab to analyse some data. The data are in .las format versions from 1 to 3. I can't use readtable as it gives me unknown file format error "Error using readtable (line 198) The file extension '.las' is not recognized." Any idea how to import these files into tables? Thanks
채택된 답변
Walter Roberson
2017년 11월 21일
0 개 추천
댓글 수: 7
Moustafa Elzeftawy
2017년 11월 21일
편집: Walter Roberson
2017년 11월 21일
Thanks Walter.
I'm trying adding path but got this warnings:
>> addpath ('C:\SeisLab_10.0301\S4M\Examples','C:\SeisLab_10.0301\S4M\Geophysics_3.0','C:\SeisLab_10.0301\S4M\Geophysics_3.0\private','C:\SeisLab_10.0301\S4M\Geophysics_3.0\@struct','C:\SeisLab_10.0301\S4M\Other','C:\SeisLab_10.0301\S4M\TestData')
Warning: Private directories not allowed in MATLAB path: C:\SeisLab_10.0301\S4M\Geophysics_3.0\private
> In path (line 109)
In addpath (line 88)
Warning: Method directories not allowed in MATLAB path: C:\SeisLab_10.0301\S4M\Geophysics_3.0\@struct
> In path (line 109)
In addpath (line 88)
Any suggestions?
Walter Roberson
2017년 11월 21일
Remove C:\SeisLab_10.0301\S4M\Geophysics_3.0\private from the list.
Moustafa Elzeftawy
2017년 11월 29일
편집: Walter Roberson
2017년 11월 29일
Hi Walter,
The tool is working now but can not read the las files.
I have tried to make it read two files, the first, las1, got the following:
>> wlog=read_las_file('las1.txt')
File "las1.txt" not found. Select file interactively.
File C:\Users\19067654\Documents\PhD\Practical\Coal_DT\las1.las interactively selected
wlog =
struct with fields:
type: 'well_log'
tag: 'unspecified'
name: 'las1'
first: 152.5000
last: 1.3895e+03
step: 0.5000
units: 'm'
null: []
from: 'las1.las'
curve_info: {'depth' 'm' ''}
curves: [2475×1 double]
wellname: 'AAO_ANABRANCH_1'
the second file gave me these errors:
>> wlog=read_las_file('las3.las')
Subscripted assignment dimension mismatch.
Error in interpret_las2>data_section_no4 (line 269)
curves(ii,:)=sscanf(tlines{ii},'%g')';
Error in interpret_las2 (line 55)
wlog=data_section_no4(wlog,tlines(index(ii)+1:index(ii+1)-1),wrap);
Error in read_las_file (line 107)
wlog=interpret_las2(tlines(3:end));
Both files are attached for your reference, I've changed the extension to txt to be able to upload.
Regards
Moustafa
The curve definition section for las2 ends in
SSN .SSNU : SHORT SPACED NEUTRON Reversed.
indicating that a column entitled SSN is expected. However, there is no such column in the ~A section. The file would probably work if you deleted that line.
Moustafa Elzeftawy
2017년 12월 5일
편집: Moustafa Elzeftawy
2017년 12월 5일
Thanks for your help Walter! It's working now.
I would appreciate if you could help me to extract the curves into a table and use the curves' names as column name.
Regards Moustafa
array2table(wlog.curves, 'VariableNames', wlog.curve_info(1,:))
Moustafa Elzeftawy
2017년 12월 5일
편집: Walter Roberson
2017년 12월 5일
Tried the command and got the following error
>> las=array2table(wlog.curves, 'VariableNames', wlog.curve_info(1,:));
Error using matlab.internal.tabular.private.varNamesDim.makeValidName (line 433)
'DEPTH Reversed.' is not a valid variable name.
Error in matlab.internal.tabular.private.varNamesDim/validateAndAssignLabels (line 311)
[newLabels,wasMadeValid] = obj.makeValidName(newLabels,exceptionMode);
Error in matlab.internal.tabular.private.tabularDimension/setLabels (line 173)
obj = obj.validateAndAssignLabels(newLabels,indices,fullAssignment,fixDups,fixEmpties,fixIllegal);
Error in matlab.internal.tabular.private.tabularDimension/createLike_impl (line 355)
obj = obj.setLabels(dimLabels,[]);
Error in matlab.internal.tabular.private.varNamesDim/createLike (line 70)
obj = obj.createLike_impl(dimLength,dimLabels);
Error in tabular/initInternals (line 207)
t.varDim = t.varDim.createLike(nvars,varnames); % error if invalid, duplicate, or empty
Error in table.init (line 327)
t = initInternals(t, vars, numRows, rowLabels, numVars, varnames);
Error in array2table (line 64)
t = table.init(vars,nrows,rownames,nvars,varnames);
Then I created a new variable that has the names in a row as following
>> wlog.curve_name=(wlog.curve_info(:,1))'
wlog =
struct with fields:
type: 'well_log'
tag: 'unspecified'
name: 'las3'
first: 221.1000
last: 523
step: 0.1000
units: 'm'
null: NaN
from: 'las3.las'
curve_info: {17×3 cell}
curves: [3020×17 double]
company: 'M.I.M. HOLDINGS LIMITED'
wellname: 'MIH_EMERALD_1'
field: 'ATP 447P'
location: 'EMERALD'
province: 'QUEENSLAND'
service: 'BPB Wireline Services'
date: '5-JUL-1992'
wellid: 'MIM E01 TD'
curve_name: {1×17 cell}
and tried the modified code
las=array2table(wlog.curves, 'VariableNames',wlog.curve_name);
and the table was created successfully.
Thanks for your help
Moustafa
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 String Parsing에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
