I tried to run my script written in 2017a in R2020b: Error using load Unable to read file 'coast.mat'. No such file or directory. Any idea on how to solve it?

103 次查看(过去 30 天)
I tried to run my script written in 2017a in R2020b:
Error message: "Error using load Unable to read file 'coast.mat'. No such file or directory. "
I installed Mapping Toolbox, Version 5.0 (R2020b).
Any idea on how to solve it?

回答(2 个)

Deepanshu Aggarwal
Deepanshu Aggarwal 2020-9-29
R2020b has coast.mat with another name: coastlines.mat
So, type load coastlines

Bjorn Gustavsson
Bjorn Gustavsson 2020-9-23
Well you will somehow find the missing file. The reason you now get the error is because matlab-2020b for some reason cannot find it, while for some reason matlab-2017a can. It is not easy to give you exact steps to take since not enough information is available. However, these are some general steps to take.
1, you can search for the file coast.mat in your operating system, that should be possible in all OSes, I run linux and would use something like:
find / -type f -name coast.mat
You'll find a way to do that.
2, you could start matlab17a and rund your script (as far as needed to set-up your matlab-path and directory-variables and change working directories) then you can ask matlab which coast.mat it has:
which coast.mat -all
After these steps you'll know where you have that file. Then you'll have to find out why matlab20b cannot find it. To me it sounds very peculiar that matlab20 cannot find the file. The only reason I can think of is if you had a file coast.mat in the matlab17a directory structure (mapping toolbox for example?) that is not installed with the new version (but here I'm fumbling in the very dark.).
HTH
  2 个评论
Arnav Gupta
Arnav Gupta 2022-5-30
I used which coast.mat -all and it shows:
'coast.mat' not found.
So this file doesnt exist in my system. Im using MATLAB R2022a
Please tell how i can get this coast.mat
Bjorn Gustavsson
Bjorn Gustavsson 2022-5-31
You should try the answer by @Deepanshu Aggarwal. If that doesn't work you will have to ask yourself if it makes sense for anyone to help you get a file with the particular name coast.mat on your computer or anywhere else.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Downloads 的更多信息

标签

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by