error message: "Undefined function 'disableChannel' for input arguments of type 'char'."

2 ビュー (過去 30 日間)
I finally have been getting the oscilloscope feature working in the instrument toolbox. I am running a Tek MDO3104 and am able to manipulate some parameters:
>> get(myScope)
AcquisitionStartDelay = 0
AcquisitionTime = 1.000000e-02
ChannelNames = CH1, CH2, CH3, CH4, MATH, REF1, REF2, REF3, REF4
ChannelsEnabled = CH1, CH2, CH3
Driver = tektronix
DriverDetectionMode = auto
Resource = TCPIP0::10.20.31.58::inst0::INSTR
SingleSweepMode = off
Status = open
Timeout = 10
TriggerMode = auto
TriggerLevel = 4.000000e-02
TriggerSlope = rising
TriggerSource = CH1
WaveformLength = 1000
>> myScope.ChannelsEnabled
ans =
'CH1' 'CH2' 'CH3'
>> disableChannel('CH1') Undefined function 'disableChannel' for input arguments of type 'char'.
Any insight as to why that fails and what I can do about it?
thank you

採用された回答

Sangeetha Jayaprakash
Sangeetha Jayaprakash 2016 年 12 月 14 日
From my understanding, it seems like you are using the Quick-control oscilloscope object, and are able to connect to the oscilloscope.
I assume that you have looked into the pre-requisites to use the Quick-control oscilloscope in this link: http://www.mathworks.com/help/instrument/using-quick-control-oscilloscope.html#bs6b15j
To disable the channels, use one of the following syntax:
1. Pass the 'myScope' object as an argument:
>> disableChannel(myScope, {'CH1', 'CH2'});
or
2. use the dot notation:
>> myScope.disableChannel({'CH1', 'CH2'});
  1 件のコメント
MarkSheffield
MarkSheffield 2016 年 12 月 14 日
OK, thank you - both of these methods work. I somehow missed including the object in both cases.

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

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by