mat file loading problem with matlab2015b

11 ビュー (過去 30 日間)
Abhinav
Abhinav 2017 年 4 月 28 日
回答済み: Abhinav 2017 年 5 月 2 日
I recently started using Matlab2015b and i have a problem with loading mat files. I get the error "Index exceeds matrix dimensions", though i have been using the same mat files since a year or two for the simulation environment. The loading works if i clear all other workspace variables or if i use import function. But it doesnt work if i drag drop or use load function from script. i would like to have a solution besides clearing workspace variable everytime i want to load a mat file.
  1 件のコメント
Adam
Adam 2017 年 4 月 28 日
Does it work if you use the
S = load(...)
syntax to load your variables into fields of a struct? Loading variables from a file straight into a workspace that already contains a bunch of variables is always somewhat dodgy.

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

採用された回答

Stephen23
Stephen23 2017 年 4 月 28 日
編集済み: Stephen23 2017 年 4 月 28 日
You have created a variable named load, and you are attempting to index into it. Next time this error occurs, run these commands and tell us exactly what is printed:
which load -all
whos load

その他の回答 (1 件)

Abhinav
Abhinav 2017 年 5 月 2 日
Thank you for the help, i had not realised my mistake of using 'load' as a variable name.

カテゴリ

Help Center および File ExchangeWhos についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by