フィルターのクリア

Input to simulink model

4 ビュー (過去 30 日間)
M
M 2012 年 5 月 3 日
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
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
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?

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by