Undefined function 'awgn' for input arguments of type 'double'.

I am using simulink 2012a version and when I cut and paste the code from the help utility, t = 0:.1:10; x = sawtooth(t); % Create sawtooth signal. y = awgn(x,10,'measured'); % Add white Gaussian noise.
I get the above error. I changed "x" to a matrix of zeros(1,10000) and I still get the same error message so it is not the data type of input. Do I need to load a particular library?
Thanks for your help

5 件のコメント

TAB
TAB 2012 年 6 月 14 日
Are you using above code in Embedded Matlab function block ?
Mark
Mark 2012 年 6 月 14 日
No I am simply entering it in the "command window".
TAB
TAB 2012 年 6 月 14 日
"I am using simulink 2012a version" -- what it means ?
Do you mean Matlab 2012 version ?
Mark
Mark 2012 年 6 月 14 日
Yes Matlab. Sorry, I looked at the wrong window.
Avinas Vem
Avinas Vem 2012 年 9 月 18 日
I have a similar problem.Weird thing is I had my awgn function working yesterday.But today on the same system it doesn't work.And yes I have my communication systems toolbox installed.(ver tells me that i have that toolbox)
snr=3; x=ones(10,1)'; y=awgn(x,snr); Undefined function 'awgn' for input arguments of type 'double' " is the message displayed.
Should i unlock the Comm Systems toolbox or something?

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

 採用された回答

Wayne King
Wayne King 2012 年 6 月 14 日

2 投票

You need the Communications System Toolbox. Do you have that installed?
Enter
>>ver
to see if you have an entry like:
Communications System Toolbox Version (R2012a)

3 件のコメント

Mark
Mark 2012 年 6 月 14 日
Thanks for the info. When I do a ver, communication system toolbox is not listed.
Wayne King
Wayne King 2012 年 6 月 14 日
There is your answer. If you want to add white Gaussian noise, you can use randn()
Noor Khan
Noor Khan 2012 年 12 月 5 日
I have the same problem. Moreover, the randn function is not working as well. what can I do now? help required please. Thanks.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangePropagation and Channel Models についてさらに検索

タグ

質問済み:

2012 年 6 月 14 日

Community Treasure Hunt

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

Start Hunting!

Translated by