passing a function to another function
Mostrar comentarios más antiguos
Hi
I am trying to pass the following function "haar" to the function integral. I am getting the following error. plz suggest. thanks
function val = haar(x)
if ((0<=x) && (x<0.5))
val=1;
elseif ((0.5<= x) && (x < 1))
val =-1;
else
val =0;
end
end
EDU>> fhnadle=@haar;
EDU>> integral(fhnadle,0,1)
Operands to the || and && operators must be convertible to logical scalar values
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Discrete Multiresolution Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!