Make error when using a embedded matlab function
古いコメントを表示
I wrote a simple function to swap variables. I am using MATLAB in Win 7.
function [x,y]= swap(u,v)
x=v;
y=u;
I get a make error stating
"Making simulation target "ex2_sfun", ...
C:\Users\....(some location)>"c:\users\(some location)" -f ex2_sfun.lmk The system cannot find the path specified."
I get Parse Ok and Code Ok.
What might be the problem? Please help me.
5 件のコメント
Kaustubha Govind
2013 年 3 月 28 日
Could you run the command getenv PATH in MATLAB and see if one of the following is true:
- PATH contains the '&' character
- PATH does not contain 'C:\Windows\System32' (or the corresponding System32 folder for your machine)
Anand
2013 年 3 月 28 日
Kaustubha Govind
2013 年 3 月 29 日
Okay, the pronlem could be that you are missing System32 on your PATH variable. Could you make sure that "C:/Windows/System32/" exists on your machine and add that to the System PATH environment variable? Then restart MATLAB and try your model again.
Anand
2013 年 4 月 1 日
Kaustubha Govind
2013 年 4 月 1 日
Now, when you run "getenv PATH" from MATLAB, does "C:/Windows/System32/" show up in the list?
回答 (1 件)
Ahmed A. Selman
2013 年 3 月 28 日
0 投票
Probably there is a simulink model with the same name. Try to use a slightly different function name for youe swap function such as swap01 or swapThem..etc. Also check your path and set it to current Matlab directory. Regards.
3 件のコメント
Anand
2013 年 3 月 28 日
Ahmed A. Selman
2013 年 3 月 29 日
From Matlab menu (File), then goto (Set Path) and click on (Add Folder) to add a single directory or (Add with subfolders) to add a folder and its children. You can also type
pathtool
to reach the same interface.
Don't forget to click (save) after you finish setting your path :)
Anand
2013 年 4 月 1 日
カテゴリ
ヘルプ センター および File Exchange で Startup and Shutdown についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!