Undefined function 'export_fig' for input arguments of type 'double'.

6 ビュー (過去 30 日間)
Douglas
Douglas 2014 年 8 月 18 日
コメント済み: Star Strider 2014 年 8 月 19 日
Undefined function 'export_fig' for input arguments of type 'double'.
Error in show_results (line 216) export_fig(fig_handle,[fname,'.pdf'])
Can anybody give me some insight into this error? thanks.
  1 件のコメント
Jan
Jan 2014 年 8 月 18 日
Which Matlab version are you using?

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

回答 (3 件)

Star Strider
Star Strider 2014 年 8 月 18 日
編集済み: Star Strider 2014 年 8 月 18 日
The ‘export_fig’ function is a popular and well-reviewed function available on the File Exchange here. You need to download it and add it to you MATLAB user path.
  2 件のコメント
Douglas
Douglas 2014 年 8 月 18 日
Sorry, It works for other inputs to the program.
Star Strider
Star Strider 2014 年 8 月 18 日
I’m now completely lost.
I’m not familiar with the details of export_fig and don’t use it often. Figure handles are (in my experience) always double-precision variables. If it works in other parts of the code, see if there’s a variable named ‘export_fig’ between the line that previously worked and the line that threw the error. The only possibility that I can think of is that you are somehow overshadowing it.

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


Jan
Jan 2014 年 8 月 18 日
Set a breakpoint in this line and run the code again. If it stops there check:
which export_fig
Perhaps you reset the path temporarily or have a typo in this line.

Douglas
Douglas 2014 年 8 月 18 日
export_fig is called once in the program. The input is in a config file. If I change the config file export_fig will run. Sometimes, though, I get the error Undefined function 'export_fig' for input arguments of type 'double'.
Hope that is cleared.
  3 件のコメント
Star Strider
Star Strider 2014 年 8 月 18 日
Douglas’s second Answer moved here:
No. The config file changes some esoteric variables but the paths are hard coded.
Star Strider
Star Strider 2014 年 8 月 19 日
Either the config file is overshadowing ‘export_fig’ or it (or something else) is telling your code to look in the wrong directory for it. Those are the only things I can think of that would cause that particular problem.
Without seeing your code and the config file to see if there is a problem with one or both of them, I am out of ideas.

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

カテゴリ

Help Center および File ExchangeWorkspace Variables and MAT-Files についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by