Borrar filtros
Borrar filtros

How does one extract/display the value of a function that is represented by a function_handle?

2 visualizaciones (últimos 30 días)
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)))

Respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by