passing a function to another function
古いコメントを表示
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
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Discrete Multiresolution Analysis についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!