0
% Find a VISA-GPIB object.
obj1 = instrfind('Type', 'visa-gpib', 'RsrcName', 'GPIB8::1::INSTR', 'Tag', '');
% Create the VISA-GPIB object if it does not exist
% otherwise use the object that was found.
if isempty(obj1)
obj1 = visa('TEK', 'GPIB8::1::INSTR');
else
fclose(obj1);
obj1 = obj1(1);
end
% Connect to instrument object, obj1.
fopen(obj1);
t = timer;
t.TasksToExecute = 3;
t.Period = 30;
t.ExecutionMode = 'fixedRate';
t.TimerFcn = @(myTimerObj, thisEvent)disp(query(obj1,'CALCulate:SPECtrum:MARKer0:Y?'));
start(t)
これは、出力値を保存する必要がある私のプログラムです。 Query('CALCulate:SPECtrum:MARKer0:Y?')
を配列に入れてください。matlabを使用して配列の形で出力を保存しますか?
このクエリを使用すると、出力値はfloat形式になります!! – SSG
@SaiSandyuthGandham何を期待していますか?このコードは、(セル配列を使用しているため)何も型にキャストしません。 – Suever
sir、 "使用法が無効なmatlab構文かもしれない"という関数でエラーを表示しています!! – SSG