Using embedded function in Simulink

1 回表示 (過去 30 日間)
Pat
Pat 2012 年 12 月 2 日
I have used Embedded matlab function in Simulink ,three have written code for a sinewave,when i use scope i do not get sine wave i just get many straight lines ,please help
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 12 月 2 日
Post your code
Pat
Pat 2012 年 12 月 2 日
t=0:0.1:10;y1=sin(4*t);
y=reshape(bsxfun(@times,repmat(y1,3,1)',[1 3 5]),1,[]);
my stop time is 0.5 , i need increasing sine wave as like that code

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

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2012 年 12 月 2 日
Pat, that's what I was expecting, the size of y is [1 303], that means your output will be a vector of 303 elements which will be displayed in your scope. Why are 'nt you using a sine wave block ? what do you to get exactly?
  7 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2012 年 12 月 2 日
編集済み: Azzi Abdelmalek 2012 年 12 月 2 日
Set the stop time to 1.99, the frequency of each sine wave blck to 56 Hz. The amplitudes to 1, 2 and 3
In configuration parameter set the fixed step size to 0.001
Pat
Pat 2012 年 12 月 2 日
Thanks a lot Azzi

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by