Why am I getting undefined function errors?

4 ビュー (過去 30 日間)
James
James 2014 年 12 月 30 日
回答済み: Geoff Hayes 2014 年 12 月 31 日
Below is a snippet of my Matlab console window. Matlab can find the file in question, but it will not run it. I've gone through the answer here, but that does not help. What am I doing wrong here?
>> which -all instrhwinfo
C:\Program Files\MATLAB\R2012a\toolbox\shared\instrument\@instrument\instrhwinfo.m % instrument method
>> instrhwinfo('serial')
Undefined function 'instrhwinfo' for input arguments of type 'char'.
>> instrhwinfo
Undefined function or variable 'instrhwinfo'.
>> help instrhwinfo
--- help for instrument/instrhwinfo ---
instrhwinfo Return information on available hardware.
[...]
Example:
out1 = instrhwinfo
out2 = instrhwinfo('serial');
out3 = instrhwinfo('gpib', 'ni');
out4 = instrhwinfo('visa', 'ni');
out5 = instrhwinfo('visa', 'ni', 'gpib');
obj = visa('ni', 'ASRL1::INSTR');
out6 = instrhwinfo(obj);
out7 = instrhwinfo(obj, 'AdaptorName');
See also instrhelp.
>> ver
-------------------------------------------------------------------------------------------------------
MATLAB Version: 7.14.0.739 (R2012a)
MATLAB License Number:
Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1)
Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpot(TM) 64-Bit Server VM mixed mode
-------------------------------------------------------------------------------------------------------
MATLAB Version 7.14 (R2012a)
  3 件のコメント
James
James 2014 年 12 月 31 日
Ah! That must be what is meant by "Run "ver" again to see if the toolbox is installed". I was a bit confused about what that meant. I will probably need to get ahold of that toolbox then.
James
James 2014 年 12 月 31 日
Yes, that is my issue, Geoff. Thanks for your input. If you create an answer, I can mark it as the accepted answer.

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

採用された回答

Geoff Hayes
Geoff Hayes 2014 年 12 月 31 日
When James typed ver into the Command Window, the result showed only the version of MATLAB and did not include the Instrument Control Toolbox and so he will have to obtain it again.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by