简体   繁体   English

如何编辑Simulink plutosdr qpsk示例

[英]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.MessageBitsa

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM