| @@ -41,30 +41,30 @@ classdef FunctionGenerator < Equipment | |||||
| end | end | ||||
| function fg = set.waveform(fg,w) | function fg = set.waveform(fg,w) | ||||
| fg.write(strcat('FUNCtion:SHAPe ', FunctionGenerator.getWave(w))); | |||||
| fg.write(['FUNCtion:SHAPe ' FunctionGenerator.getWave(w)]); | |||||
| end | end | ||||
| function fg = set.frequency(fg,f) | function fg = set.frequency(fg,f) | ||||
| Equipment.forceNum(f); | Equipment.forceNum(f); | ||||
| fg.write(strcat('FREQuency ', num2str(f))); | |||||
| fg.write(['FREQuency ' num2str(f)]); | |||||
| end | end | ||||
| function fg = set.voltage(fg,v) | function fg = set.voltage(fg,v) | ||||
| Equipment.forceNum(v); | Equipment.forceNum(v); | ||||
| fg.write(strcat('VOLTage ', num2str(v))); | |||||
| fg.write(['VOLTage ' num2str(v)]); | |||||
| end | end | ||||
| function fg = set.unit(fg,u) | function fg = set.unit(fg,u) | ||||
| fg.write(strcat('VOLTage:UNIT ', FunctionGenerator.getUnit(u))); | |||||
| fg.write(['VOLTage:UNIT ' FunctionGenerator.getUnit(u)]); | |||||
| end | end | ||||
| function fg = set.offset(fg,o) | function fg = set.offset(fg,o) | ||||
| Equipment.forceNum(o); | Equipment.forceNum(o); | ||||
| fg.write(strcat('VOLTage:OFFSet ', num2str(o))); | |||||
| fg.write(['VOLTage:OFFSet ' num2str(o)]); | |||||
| end | end | ||||
| function fg = set.load(fg,l) | function fg = set.load(fg,l) | ||||
| fg.write(strcat('OUTPut:LOAD ', FunctionGenerator.getLoad(l))); | |||||
| fg.write(['OUTPut:LOAD ' FunctionGenerator.getLoad(l)]); | |||||
| end | end | ||||
| end | end | ||||
| @@ -73,7 +73,7 @@ classdef FunctionGenerator < Equipment | |||||
| w = regexp(num2str(win), '(si|sq|mi|ma|[trndu1-7]|s)', 'match', 'once', 'ignorecase'); | w = regexp(num2str(win), '(si|sq|mi|ma|[trndu1-7]|s)', 'match', 'once', 'ignorecase'); | ||||
| if isempty(w) | if isempty(w) | ||||
| error(strcat('Invalid waveform: ', win)); | |||||
| error(['Invalid waveform: ' win]); | |||||
| end | end | ||||
| w = regexprep(w, {'^(1|si|(?-i)s)$', '^(2|sq|(?-i)S)$', '^[3t]$', '^[4r]$', '^[5n]$', '^[6d]$', '^[7u]$', '^mi$', '^ma$'}, ... | w = regexprep(w, {'^(1|si|(?-i)s)$', '^(2|sq|(?-i)S)$', '^[3t]$', '^[4r]$', '^[5n]$', '^[6d]$', '^[7u]$', '^mi$', '^ma$'}, ... | ||||
| @@ -84,7 +84,7 @@ classdef FunctionGenerator < Equipment | |||||
| u = regexp(num2str(uin), '([1-4]|vp|vr|db|de)', 'match', 'once', 'ignorecase'); | u = regexp(num2str(uin), '([1-4]|vp|vr|db|de)', 'match', 'once', 'ignorecase'); | ||||
| if isempty(u) | if isempty(u) | ||||
| error(strcat('Invalid voltage unit: ', uin)); | |||||
| error(['Invalid voltage unit: ' uin]); | |||||
| end | end | ||||
| u = regexprep(u, {'^(1|vp)$', '^(2|vr)$', '^(3|db)$', '^(4|de)$'}, ... | u = regexprep(u, {'^(1|vp)$', '^(2|vr)$', '^(3|db)$', '^(4|de)$'}, ... | ||||
| @@ -95,7 +95,7 @@ classdef FunctionGenerator < Equipment | |||||
| l = regexp(num2str(lin), '([12]|50|in|mi|ma)', 'match', 'once', 'ignorecase'); | l = regexp(num2str(lin), '([12]|50|in|mi|ma)', 'match', 'once', 'ignorecase'); | ||||
| if isempty(l) | if isempty(l) | ||||
| error(strcat('Invalid load: ', lin)); | |||||
| error(['Invalid load: ' lin]); | |||||
| end | end | ||||
| u = regexprep(l, {'^(1|50)$', '^(2|in)$', '^mi$', '^ma$'}, ... | u = regexprep(l, {'^(1|50)$', '^(2|in)$', '^mi$', '^ma$'}, ... | ||||