필터 지우기
필터 지우기

How to compile against a specific MCR version?

조회 수: 4 (최근 30일)
Neil Caithness
Neil Caithness 2013년 10월 24일
댓글: Image Analyst 2013년 11월 7일
I have an application compiled for MCR 7.17 about a year ago. This has been in constant use by a third party. They requested a small change to address changes to an external API, which I made and recompiled, now for MCR 8.1, which is what I now have on my machine. Third party also installs MCR 8.1, but now the executable fails. The log files my application writes tell me that it fails not at the point of my new change, which generates the expected output, but fails later in (to-the-best-of-my-knowledge) non-dependent code, apparently on a 'find' statement with 'Too many input arguments'. I can't easily recreate a development environment because of a 1TB data stack on the third-party machine that I no longer have on mine. (Bad development management practice perhaps, but I still have a problem.)
So, my questions:
  1. Has the behaviour of 'find' changed between MCR 7.17 and 8.1?
  2. How can I compile against a specific MCR version? i.e. for MCR 17.7 on my R2013a installation.
  댓글 수: 4
Image Analyst
Image Analyst 2013년 11월 5일
Can you show us what the find() line of code looks like?
Neil Caithness
Neil Caithness 2013년 11월 7일
The find call looks like this
k = find(eco_id==eco(i).ECO_ID);
inside a for loop iterating over i
Guess I have to find out the state of eco_id and eco.ECO_ID, as you suggest by saving a .mat file.

댓글을 달려면 로그인하십시오.

답변 (2개)

Yatin
Yatin 2013년 11월 7일
편집: Yatin 2013년 11월 7일
Hi Neil,
I do not think that the behavior of "find" has changed between the MCR versions. However, to be sure you can check the same on the documentation for MATLAB versions online. Below is the link:
As far as compiling against a new MCR is concerned, you need to install the new MCR and then add it as a first thing in your Windows PATH environment variable. Below is the link for the same.

Image Analyst
Image Analyst 2013년 11월 7일
Assuming ECO_ID and eco_id are both integers, I see nothing wrong with that. And there is only one argument (the logical expression eco_id==eco(i).ECO_ID), which is not too many. I don't know what you're doing with k but you might want only one k, in case there are multiple matches. So in that case
k = find(eco_id==eco(i).ECO_ID, 1, 'first'); % Get only the first match.
if isempty(k)
warningMessage = sprintf('Warning, ecod_id %d not found!', eco_id);
uiwait(warndlg(warningMessage));
% Perhaps break out of the loop if you need to,
% or use continue to skip to end of loop.
end
  댓글 수: 2
Neil Caithness
Neil Caithness 2013년 11월 7일
Thanks very much for the tips. In this case I am expecting multiple matches to be returned in k - they are the WWF defined ecoregion polygons for which I then find the intersections.
I suspect the actual error message being give on the find statement is misleading, but I'd still like to find the cause because at some stage I am going to want to recompile this against the new MCR for my own use.
Image Analyst
Image Analyst 2013년 11월 7일
Is there anyway you could obtain the source code?

댓글을 달려면 로그인하십시오.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by