Error message= Collums 1 through 2

1 回表示 (過去 30 日間)
Axel Sellert
Axel Sellert 2017 年 6 月 5 日
コメント済み: Axel Sellert 2017 年 6 月 13 日
Hi, I am using Matlab on a library computer at my Uni where they have version R2016a. Whenever I am trying to read in my excel workbook for a path using xlsread I receive an error message saying
ErrorMessage =
Columns 1 through 2
'This package uses the Matlab command xlsread to read from Excel files.' 'This command appeared for the first time in Matlab 6. Your version of Matlab is older than version 6.'
Column 3
'You must modify the file DSGEReadExcel.m or BVARReadExcel.m to read in data etc in some other way. Or upgrade Matlab ...'
This is strange since it is version 9.0 ie R2016a
Could anyone please help?

採用された回答

Arnav Mendiratta
Arnav Mendiratta 2017 年 6 月 13 日
I reckon you have installed some third party packages which are shadowing the "xlsread" function. Execute the following command to see if the function is shadowed:
which -all xlsread
The output should look like:
C:\Program Files\MATLAB\R2017a\toolbox\matlab\iofun\xlsread.m
If you have different output, you would need to rename the shadowed function. Alternatively, you can restore the MATLAB path using:
restoredefaultpath
rehash toolboxcache
This will remove all the third party toolboxes and support packages. If you would like to save this default configuration, use:
savepath
  1 件のコメント
Axel Sellert
Axel Sellert 2017 年 6 月 13 日
Thanks for your answer. It is indeed a third party package, it had a strange built in function asking if it was version 6 or 7 of Matlab. Since I ran neither of those it gave me that error message. It's been resolved now though through just modifying that part of the code.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import from MATLAB についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by