Matlab: store input variables for arrayfun
Ältere Kommentare anzeigen
Hi all,
I have the following function:
function [value_final] = myvalue(fd)
value_final = (fs + (fd.*(th.^2)));
end
Values for th and fs are constant, but for fd I use
fd = linspace(0,50,20);
th=5;
fs=8.5;
B = arrayfun(@myvalue,fd);
How can I create a matrix with in the first column each input value for 'fd' and in the second column the corresponding value for 'value_final' for each iteration? Later I want to include a range of values for 'fs' as well, so it would be nice to know which combination yields which value.
Thanks!
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing 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!