Borrar filtros
Borrar filtros

express function as function handles

1 visualización (últimos 30 días)
Bright Edison
Bright Edison el 16 de Abr. de 2019
Comentada: Walter Roberson el 16 de Abr. de 2019
How can i express this function as a function handle @dints
function f = dint2(x, y)
tmp=[];
for ii=1:1:length(x)
tmp(ii)=x(ii) * y^2 *density(x(ii),y);
end
f=tmp;
end
  1 comentario
Walter Roberson
Walter Roberson el 16 de Abr. de 2019
It would be more efficient to initialize
tmp = zeros(1, length(x));

Iniciar sesión para comentar.

Respuestas (1)

per isakson
per isakson el 16 de Abr. de 2019
Editada: per isakson el 16 de Abr. de 2019
fh = @dint2;
What's density() ?

Categorías

Más información sobre Environment and Settings en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by