calling a function: "undefined function or variable 'abc'"
Mostrar comentarios más antiguos
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!
Respuesta aceptada
Más respuestas (1)
Niels
el 5 de En. de 2017
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)
Categorías
Más información sobre Array Geometries and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!