我正在尝试使用
matlab编程33120A,函数发生器输出不同幅度的正弦波作为测试程序。
我能用蛮力方法做到这一点:“fprintf(funct_gen1,'SOURCE:APPLY:SIN 10000,0.6');%将输出设置为正弦,10kHz,600mVpk-pk”然后我重复同样的一行
一个不同的幅度等等。是否有可能用一个变量替换手动输入,也就是0.6,比如说volt_set,它指的是所有幅度设置的表格?
这将使代码更容易。
谢谢你的帮助.JoeD
以上来自于谷歌翻译
以下为原文
I am trying to program a 33120A, with MATLAB, func
tion generator to output a sine wave at different amplitudes as a test routine. I am able to do it in a brute force method:
"
fprintf(funct_gen1, 'SOURCE:APPLY:SIN 10000, 0.6'); % Set the output to a Sine, 10kHz, 600mVpk-pk
"
Then I repeat the same line with a different amplitude and so on.
Is it possible to replace the manual entry, aka the 0.6, with a variable, let’s say volt_set, that refers to a table of all the amplitude setting? That would make the code easier. Thanks for any help.
JoeD
0