How does one extract/display the value of a function that is represented by a function_handle?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
How does one extract/display the value of a function that is represented by a function_handle?
Here is my script:
=== BEGIN ===
firstindex = 0;
lastindex = 3;
x_vector = firstindex:lastindex;
x_vector = x_vector';
n = 10;
n_vector = n*ones(size(x_vector));
p=1e-04;
p_vector = p*ones(size(x_vector));
sum_prob = @(x_vector,n_vector,p_vector) (sum(binopdf(x_vector,n_vector,p_vector)))
=== END ===
I want to see the value (i.e., a number) of sum_prob, but all I get is this:
sum_prob =
function_handle with value:
@(x_vector,n_vector,p_vector) (sum(binopdf(x_vector,n_vector,p_vector)))
2 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Solver Outputs and Iterative Display dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!