How can I load an m-file into an executable file made by using mcc?
    5 ビュー (過去 30 日間)
  
       古いコメントを表示
    
I have compiled my m-file functions and now I have an executable file. The main function requires the input m-file (case.m) and the name of output m-file. Since the input m-file structure includes several matrices, I use [cat1,cat2, cat3]=feval(case) inside my main function. Then: mcc -m mymainfunction
When I am running mymainfunction.exe in cmd, it pops out errors referring to the line where I used feval.
0 件のコメント
回答 (2 件)
  Harsheel
    
 2013 年 5 月 30 日
        You can make the case.m file a part of the executable using the -a flag. For example:
mcc -m mymainfunction -a case.m
Else you can use function DEPLOYTOOL and add the dependent case.m file under the 'Shared Resources and Helper Files' section.
0 件のコメント
  Image Analyst
      
      
 2013 年 5 月 30 日
        Why use feval()? Why not just call case from your main function code? I don't see why feval() is necessary at all. Please explain why you think it is? It's quite possible for an m-file like case.m to return 3 output arguments just by calling it and not using feval(). I do it all the time.
0 件のコメント
参考
カテゴリ
				Help Center および File Exchange で MATLAB Compiler についてさらに検索
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!