works in Windows but not on MacBook Pro

조회 수: 1 (최근 30일)
Peter Copeland
Peter Copeland 2017년 2월 7일
답변: Walter Roberson 2017년 2월 7일
A colleague of mine wrote some code to manipulate files downloaded from the internet. It worked fine on his computer (Windows) but when we tried it on mine (Mac OS 10.12.2) we get errors in reading the files. The problem comes here:
F_htx = strfind(F, 'htx');
fullpathname_htx = char(strcat(folder_name,'/',F(find(not(cellfun('isempty', F_htx))),1)))
[numbers_htx text_htx, data_htx] = xlsread(fullpathname_htx);
I get this error:
File is not in recognized format.
Is there something about the file structures that we need to take into account?
Thanks.
-Pete

답변 (1개)

Walter Roberson
Walter Roberson 2017년 2월 7일
I recommend that you break this up into several lines. I also recommend that it be rewritten with fullfile() . Oh, and check in case there are more than one entries matching 'htx'

카테고리

Help CenterFile Exchange에서 Downloads에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by