How do I store each output of my function as an vector element?
Ältere Kommentare anzeigen
I wrote a cross-ambiguity function (Function [tau,doppler,tau_p,doppler_p] = wgenx). There are no input arguments.
When I call my function in the command window, I get an output of four values.
I want to run my function 500 times and get 500 tau values, 500 doppler values, 500 tau_p values and 500 doppler_p values. But I want the 500 tau values in a vector (dimension 1 x 500) and 500 doppler values in a separate vector (dimension 1 x 500).
I am using on older 2010a student matlab version.
Help?
Akzeptierte Antwort
Weitere Antworten (1)
Andrei Bobrov
am 12 Mär. 2014
Bearbeitet: Andrei Bobrov
am 12 Mär. 2014
[tau,doppler,tau_p,doppler_p] = arrayfun(@wgenx,1:500);
ADD
[tau,doppler,tau_p,doppler_p] = arrayfun(@(x)wgenx,1:500);
2 Kommentare
Pamela Stein
am 12 Mär. 2014
Andrei Bobrov
am 12 Mär. 2014
it for Octave, for MATLAB see ADD part
Kategorien
Mehr zu Detection, Range and Doppler Estimation finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!