hi all, I am trying to open a file with .001 extension , fopen gives error. can you please help?
조회 수: 4 (최근 30일)
이전 댓글 표시
I am using d=dir(*.001), and can see file name (abcd.001) from name=d.name but fid1=fopen(name) returns negative value.
댓글 수: 4
James Tursa
2017년 5월 24일
편집: James Tursa
2017년 5월 24일
I assume you meant to type d=dir('*.001') with the single quotes? Works for me PCWIN R2011a:
>> d=dir('*.001')
d =
name: 'abcd.001'
date: '24-May-2017 09:00:35'
bytes: 16
isdir: 0
datenum: 7.3684e+005
>> d.name
ans =
abcd.001
>> fid = fopen(d.name)
fid =
3
답변 (2개)
Steven Lord
2017년 5월 24일
Call fopen with two outputs. If the first output is -1, display the second output to see why the file open operation did not succeed.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Files and Folders에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!