完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
亲爱的所有人,有人可以解释将任意波形数据馈送到33250A的正确方法。
为了生动地解释,我在这里给出了一个示例matlab代码,通过该代码我将波形数据转储到Text文件中,然后使用Agilent波形编辑器将其提供给生成器。“%%%%%%% x = linspace(0,2) * pi,4 * 1024); a = cos(50e3 * x); m = max(a); a = a / m; plot(a); grid on; fp = fopen('C: Documents and Settings Administrator Desktop lokesh feedInput.txt','w'); fprintf(fp,'%f n',a(1:4 * 1024-1)); fclose(fp);“问题:1)As 你在上面的程序中看到,我打算将4K点波形数据输入波形发生器。 我在X轴上打破点的方式是正确的吗?。(x = linspace(0,2 * pi,4 * 1024 + 1))2)请注意,当将点转储到文本文件时,我 只取“0到n-1分”而不是“0到n”。 这是正确的吗?问候,洛克斯 以上来自于谷歌翻译 以下为原文 Dear All, Could someone please explain the correct way to feed a arbitrary waveform data to the 33250A. To explain vividly, I have given a sample matlab code here through which I dumped a waveform data to a Text file and then fed it to the generator using Agilent waveform editor. "%%%%%%% x=linspace(0,2*pi,4*1024); a = cos(50e3*x); m=max(a); a = a/m; plot(a); grid on; fp = fopen('C:Documents and SettingsAdministratorDesktoplokeshfeedInput.txt','w'); fprintf(fp,'%f n',a(1:4*1024-1)); fclose(fp); " Question: 1)As you see in the above program, I'm planning to feed a 4K point waveform data to the waveform generator. Is the way in which I have broken the points in X-axis correct?.(x=linspace(0,2*pi,4*1024+1)) 2)Do note that when dumping the points to a text file, I'm taking only "0 to n-1 points" instead of "0 to n". Is it correct? Regards, lokesh |
|
相关推荐
2个回答
|
|
嗨Lokesh,“1)正如您在上面的程序中看到的那样,我打算将4K点波形数据输入波形发生器。我在X轴上打破点的方式是正确的吗?(x =
linspace(0,2 * pi,4 * 1024 + 1))“是的,在波形上生成点的线性采样是最佳实践。 在您提到的样本Matlab代码中,您提到(x = linspace(0,2 * pi,4 * 1024 + 1))(x = linspace(0,2 * pi,4 * 1024))。 我认为后者是你的意思。 (x = linspace(0,2 * pi,4 * 1024))生成一个4 * 1024点(4096点)的行向量,线性间隔在0和2 * pi之间并包括0和2 * pi。“2)请注意,当倾倒点时 对于一个文本文件,我只取“0到n-1点”而不是“0到n”。它是否正确?“同样,你在问题中键入的内容与代码中的内容之间存在差异。 由于矩阵“a”的下标索引必须是正整数(它们从1开始),因此您需要取点“1到n”。 点0不存在。 在你的代码中输入“a(1:4 * 1024-1)”,这只是4095分。 我假设你有4096点可以通过“a(1:4 * 1024)”完成。代码整体工作只需要小心将正确的点和正确的点数发送到你的文本文件。 您可能也有兴趣知道您可以将Matlab生成的arb直接发送到33250A而无需创建文本文件并首先将其加载到IntuiLink波形编辑器中。 下面的链接将带您到此论坛上发布的如何执行此操作的示例.view topicThanks!Mueller 以上来自于谷歌翻译 以下为原文 Hi Lokesh, " Yes, generating a linear sampling of points over the waveform is the best practice. Above you mention (x=linspace(0,2*pi,4*1024+1)) while in your sample Matlab code you use (x=linspace(0,2*pi,4*1024)). I would think the latter is what you are meaning to use. (x=linspace(0,2*pi,4*1024)) generates a row vector of 4*1024 points (4096 points) linearly spaced between and including 0 and 2*pi. " Again there is a discrepancy between what you type in your question and what is in the code. Since the subscript indices for your matrix "a" must be positive integers (they start at 1), you will want to take points "1 to n". Point 0 does not exist. In your code you type "a(1:4*1024-1)" this is only 4095 points. I am assuming you are looking to have 4096 points which would be accomplished with "a(1:4*1024)" . The code works overall just be careful of sending the correct points and the correct number of points to your text file. You may also be interested to know that you can send your Matlab generated arb directly to the 33250A without creating a text file and loading that onto IntuiLink Waveform Editor first. The link below will take you to an example of how to do this posted on this forum. view topic Thanks! Mueller |
|
|
|
谢谢,我也意识到我输入的消息和代码之间的错误。我下次会以一个整洁的方式完全提出我的查询.Regards,Lokesh
以上来自于谷歌翻译 以下为原文 Thanks and also I realize the mistakes between my typed messages and the code. I would exactly put my query in a neat way next time. Regards, Lokesh |
|
|
|
只有小组成员才能发言,加入小组>>
855 浏览 0 评论
2188 浏览 1 评论
1971 浏览 1 评论
1834 浏览 5 评论
2708 浏览 3 评论
680浏览 1评论
关于Keysight x1149 Boundary Scan Analyzer
476浏览 0评论
N5230C用“CALC:MARK:BWID?”获取Bwid,Cent,Q,Loss失败,请问大佬们怎么解决呀
573浏览 0评论
2365浏览 0评论
1420浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-8-17 20:32 , Processed in 1.232471 second(s), Total 76, Slave 63 queries .
Powered by 电子发烧友网
© 2015 www.ws-dc.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号