フィルターのクリア

express function as function handles

1 回表示 (過去 30 日間)
Bright Edison
Bright Edison 2019 年 4 月 16 日
コメント済み: Walter Roberson 2019 年 4 月 16 日
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 件のコメント
Walter Roberson
Walter Roberson 2019 年 4 月 16 日
It would be more efficient to initialize
tmp = zeros(1, length(x));

サインインしてコメントする。

回答 (1 件)

per isakson
per isakson 2019 年 4 月 16 日
編集済み: per isakson 2019 年 4 月 16 日
fh = @dint2;
What's density() ?

カテゴリ

Help Center および File ExchangeEnvironment and Settings についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by