Not enough input arguments?

1 回表示 (過去 30 日間)
Ahmed Fadhil Hassoney
Ahmed Fadhil Hassoney 2013 年 11 月 10 日
コメント済み: Azzi Abdelmalek 2013 年 11 月 10 日
i have signal in the workspace i want to pass it to the imbedded matlab function block in the simulink.i set the properties of signal from workspace block as sample rate 1 and sample per frame is also 1, so in the case the exact signal in the workspace will be as input to the embedded matlab function block (am i right?)
when i run the simulink i dont get the output and when i run function m file i got the error that "Not enough input arguments"
Notice: when i run the code in matlab command window its running correctly but cant run in the matlab function in the simulink. also the input signal is already uploaded to the workspace.
any help please

回答 (1 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 10 日
You can't run a Matlab function, read about functions at this link http://www.mathworks.com/help/matlab/ref/function.html
I don't know how you set the [from workspace] block, try this:
In Matlab windows command, type
ts=0.1 % sample time
t=0:ts:10 % time vector
y=sin(t)% your signal
If t and y are vector column, set the parameter data of [from workspace] block to
[t y]
  2 件のコメント
Ahmed Fadhil Hassoney
Ahmed Fadhil Hassoney 2013 年 11 月 10 日
I run the matlab function in the simulink using "embedded matlab function block", also i have used block "signal from workspace" to call the input signal and set the parameters in the block "double click on the block"
any suggestion plz help
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 11 月 10 日
how did you set the parameters ?

サインインしてコメントする。

Community Treasure Hunt

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

Start Hunting!

Translated by