calling a function: "undefined function or variable 'abc'"
古いコメントを表示
Hi there,
I'm trying to write my very first function and it looks like this:
function noiseSignal = add_white_noise(t_spalte, recSignal)
noiseSignal = recSignal + 1/64*randn(size(t_spalte));
end
I call the function with name and input via the command line and I get the noise on my original signal, but not under the variable "noiseSignal". I can use it via ans, but that's it. How can I save the noisy signal under "noiseSignal" for further usage?
Thanks a lot!
採用された回答
その他の回答 (1 件)
Niels
2017 年 1 月 5 日
Hi,
if you type
a = add_white_noise(Argument1, Argument2)
the output will be saved within the variable named a. i guess you want its name to be noiseSignal, so type
% Argument1=t_spalte;
% Argument2=recSignal;
noiseSignal = add_white_noise(Argument1, Argument2)
カテゴリ
ヘルプ センター および File Exchange で Array Geometries and Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!