Input to simulink model
5 views (last 30 days)
Show older comments
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 Comment
TAB
on 3 May 2012
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?
Answers (1)
Kaustubha Govind
on 3 May 2012
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 Comments
See Also
Categories
Find more on Sources in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!