Input to simulink model
4 次查看(过去 30 天)
显示 更早的评论
How do I give a constant input to a simulink model from the workspace? I want to give the SNR input from the command window to the http://www.mathworks.com/products/communications/demos.html?file=/products/demos/shipping/comm/commadaptivemimo.html simulink demo.
So far I tried adding a simin block (From Workspace) to snr input of the AWGN Channel block. Added Simulation -> Configuration Parameters -> Data Import/Export -> Input: snr
In the Workspace:
snr.time = [0, 0]';
snr.signals.values = [5, 5]'; % I want to give a constant snr value.
snr.signals.dimensions = 1;
When I try to run it, it gives the error: Error reported by S-Function 'scomerrrate2' in 'commadaptivemimo/Frame Error Rate Calculation/Error Rate Calculation': All sample times for this block must be discrete. Continuous sample time is not allowed.
How do I resolve this error?
1 个评论
TAB
2012-5-3
The error you are getting is not seems to be ralated to your input.
Can you give the input just by using a constant block and check whether it works ?
Also, do you want to give constant value from wotkspace or from command window?
回答(1 个)
Kaustubha Govind
2012-5-3
The SNR input to the AWGN is already a Constant block that holds the value adaptivemimo.SNR (which evaluates to 10 in the workspace). Why not simply change the value in the dialog from adaptivemimo.SNR to 5?
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Sources 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!