フィルターのクリア

Do i need to modify my program to use it in compiler?

1 回表示 (過去 30 日間)
subha
subha 2014 年 6 月 18 日
編集済み: José-Luis 2014 年 6 月 19 日
I have implemented a program in Matlab.It is too slow. To improve the speed, i would like to use Matlab compiler. As per the videos added in Mathworks, i created standalone app for matlab. when i run it outside matlab, it shows me message as below.
error invalid file identifier. Use fopen to generate valid file identifier. error in line 6
This is my main file.
clear all
close all
maxepoch=50;
numhid=500;
fprintf(1,'Converting Raw files into Matlab format \n');
converter;
makebatches2;
[numcases numdims numbatches]=size(batchdata);
%N=numcases;
restart=1;
gdrbmcd2;
As per my understanding, i need to rewrite the main file. For ex: converter is a subfile of my program.So, i need to use fopen to open that file during compilation. Is that right?
  2 件のコメント
José-Luis
José-Luis 2014 年 6 月 18 日
編集済み: José-Luis 2014 年 6 月 19 日
Why do you say it is too slow? The compiler might not be the solution. Why do you want to do it this way?
Are you sure you are not confusing Matlab compiler with Matlab coder? Maybe a mex file is what you need instead?
subha
subha 2014 年 6 月 19 日
編集済み: subha 2014 年 6 月 19 日
Thanks for your suggestion. what is mex file.
To run this model, it approximately takes more than 8 hour.Someone suggested me to use compiler. I am new to matlab. When i search about matlab compiler, i come to know matlab is for standalone applications not for speed. But i want to know to use compiler.

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

回答 (1 件)

Image Analyst
Image Analyst 2014 年 6 月 19 日
I know you read the post by the Mathworks that says that compiling your app won't speed it up because you posted an "Answer" to it. http://www.mathworks.com/matlabcentral/answers/94695-does-the-matlab-compiler-speed-up-the-execution-time-of-matlab-functions
So I don't know why you have asked this question.
In most (or all?) cases, you compile the code to provide it to people who have computers without the MATLAB development installed - not to speed up your m-file.
  3 件のコメント
Image Analyst
Image Analyst 2014 年 6 月 19 日
1 is the standard output so it should have been okay. But it's actually not needed. Just use fprintf() this way:
fprintf('Converting Raw files into Matlab format \n');
Image Analyst
Image Analyst 2014 年 6 月 19 日
By the way, it doesn't look like batchdata is in scope so your size function will also bomb.

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by