M-file created in previous version, not working in advanced version.

Hi,
The m-file and Simulink model which I created in R2012b version is not working suddenly in R2013a version. Actually R2012b is installed in my office computer and R2013a version is installed in my personal computer. All these days, there was no problem in running the files in both these versions. But now suddenly, I couldn't run the files in R2013a , which were created in 2012b version.
This is the error I get, when I try to run the files,
Attempt to execute SCRIPT hdlcoderui.hdlcc.update as a function:
C:\Program
Files\MATLAB\R2013a\toolbox\shared\hdlshared\hdlshared_gui\@hdlcoderui\@hdlcc\update.m
Can anyone please tell what may be the reason for this sudden incompatibility.
Thanks.

9 件のコメント

per isakson
per isakson 2014 年 9 月 10 日
  • What does this has to do with the "Matlab compiler"?
Priya
Priya 2014 年 9 月 10 日
Sorry I would have wrongly tagged. but I wonder why this problem occurs,suddenly.
per isakson
per isakson 2014 年 9 月 10 日
編集済み: per isakson 2014 年 9 月 10 日
Have you checked whether
....2013a\toolbox\shared\hdlshared\hdlshared_gui\@hdlcoderui\@hdlcc\update.m
is a function or a script. In my R2013a it's a function.
&nbsp
Is it possible that you have script named update in the wrong place? Far-fetched, but I cannot think of any other reason.
Priya
Priya 2014 年 9 月 10 日
Sorry could you please tell me how to check whether it is a function or script.
Priya
Priya 2014 年 9 月 10 日
I don't know where should it be. I think it has got something to do with the installation. I'm not sure about it. Is there anything that I could do to overcome this problem. Sorry to ask the same question repeatedly.
Thanks very much for your time.
Star Strider
Star Strider 2014 年 9 月 10 日
It shouldn’t just stop working when it worked before. This may be a path problem.
MATLAB core and built-in functions should be in ‘C:\Program Files\MATLAB\R2013a\...’
Your scripts should be in ‘C:\Users\...\Documents\MATLAB\...’
Contact MathWorks Support if you continue to have problems.
Priya
Priya 2014 年 9 月 10 日
Thanks for your reply. So in that case, can I do it myself that is can I remove that file from ‘C:\Program Files\MATLAB\R2013a\...’ and paste it in ‘C:\Users\...\Documents\MATLAB\...’. Will that work by any chance?
per isakson
per isakson 2014 年 9 月 10 日
編集済み: per isakson 2014 年 9 月 10 日
Follow Star Strider's advice and contact http://www.mathworks.com/support/contact_us/index.html
&nbsp
"check whether it is a function or script."
Priya
Priya 2014 年 9 月 10 日
Fine thanks.

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

回答 (2 件)

Ahmed
Ahmed 2014 年 9 月 10 日

0 投票

Unfortunately,that is normal in Matlab so you need to upgrade your files

7 件のコメント

Priya
Priya 2014 年 9 月 10 日
Thanks you, but please tell me how to upgrade the files, I don't understand it.
per isakson
per isakson 2014 年 9 月 13 日
編集済み: per isakson 2014 年 9 月 13 日
"that is normal in Matlab" &nbsp I don't understand. Exactly what is normal?
Image Analyst
Image Analyst 2014 年 9 月 13 日
I don't know either. I don't know if he's being sarcastic that it's normal for m-files to break in newly released versions of MATLAB, or something else. I also don't know what "files" he's talking about - Priya's MATLAB installation (all the files that comprise MATLAB), or Priya's own files.
per isakson
per isakson 2014 年 9 月 13 日
I assume he is talking about "Priya's own files". IMO: Ahmed's statement is false.
Image Analyst
Image Analyst 2014 年 9 月 13 日
The only situation I've seen where it's true is if someone has a really old m-file that uses a deprecated or obsolete function that is no longer included in the current version of MATLAB. But this is by no means the "normal" situation . The only time I can remember of it happening to me is when they got rid of the 4th return argument of fileparts(), which was "version".
Ahmed
Ahmed 2014 年 9 月 13 日
I am facing the same problem when I am using R2007a version and R2013a version especially with parfor instead for loop as my program worked well in older version but not worked with new version therefore I need to minor correction(upgrade) with my files so I supposed your situation the same and sorry if I confused you
Priya
Priya 2014 年 9 月 15 日
Thanks to all for your time. I have reinstalled the version once again which was creating problem as I didn't have any other choice and also I was running out of time for my project. Anyway thanks again for your suggestions.
@Ahmed: Not a problem, thanks.

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

Iain
Iain 2014 年 9 月 15 日

0 投票

I've found that simulink files don't always transfer neatly from one version of matlab to a newer version. You'll likely find that one or two blocks got "meaningfully" changed.
I've found that some "inbuilt" m files which work like a dream in one version of matlab don't work in another. - median, for example, can't work on integers in 2012, but will on 2011 and 2013 versions. (median(uint8(1:5)) throws an error in 2012)
The error you're getting could be caused by either type of problem.

2 件のコメント

Priya
Priya 2014 年 9 月 15 日
Well, thanks lain for your suggestion. I will keep in mind if I come across this problem again in future.
Titus Edelhofer
Titus Edelhofer 2014 年 9 月 15 日
Yes and no: median worked in 2011 for integers, but was not officially supported (the doc said "A should be of type single or double."). In 2012 it threw an error, and official support - without error ;-) started in 2013 ...
Titus

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

カテゴリ

ヘルプ センター および File ExchangeStartup and Shutdown についてさらに検索

製品

質問済み:

2014 年 9 月 10 日

コメント済み:

2014 年 9 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by