Input to simulink model

조회 수: 3 (최근 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 CenterFile Exchange에서 Sources에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by