[英]how to edit simulink plutosdr qpsk example
I am working with this example from MathWorks: https://www.mathworks.com/help/supportpkg/plutoradio/examples/qpsk-transmitter-with-adalm-pluto-radio-1.html 我正在使用MathWorks中的以下示例: https : //www.mathworks.com/help/supportpkg/plutoradio/examples/qpsk-transmitter-with-adalm-pluto-radio-1.html
When i run the example it creates an sdrqpsktx
variable in the matlab workspace 当我运行示例时,它将在matlab工作区中创建
sdrqpsktx
变量
I want to change sdrqpsktx.MessageBits
to something smaller. 我想将
sdrqpsktx.MessageBits
更改为更小的内容。
When i run the following code in matlab: 当我在matlab中运行以下代码时:
a = sdrqpsktx.MessageBits(1:448);
sdrqpsktx.MessageBits = a;
I successfully change sdrqpsktx.MessageBits
to a
. 我成功地改变
sdrqpsktx.MessageBits
到a
。
However when i run this in simulink sdrqpsktx.MessageBits
changes back to its original size. 但是,当我在simulink
sdrqpsktx.MessageBits
运行此sdrqpsktx.MessageBits
,它sdrqpsktx.MessageBits
回其原始大小。
How do i permanently change sdrqpsktx.MessageBits
and run the example with my changes? 如何永久更改
sdrqpsktx.MessageBits
并使用所做的更改运行示例?
Thank you. 谢谢。
There is a model callback, probably a StartFcn
, that is overwriting your changes to the variable every time you start the simulation. 有一个模型回调,可能是
StartFcn
,它在每次启动模拟时都会覆盖对变量的更改。 You either need to delete or modify that code. 您需要删除或修改该代码。
To see the code go to: File->Model Properties->Model Properties
, and select the Callback
tab. 要查看代码,请转到:
File->Model Properties->Model Properties
,然后选择Callback
选项卡。
Any callback that is followed by a *
has code in it. 任何带有
*
回调都包含代码。 Click on that callback to see the code. 单击该回调以查看代码。
See Callbacks for Customized Models for more detailed information. 有关更多详细信息,请参见自定义模型的回调 。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.