フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

accelerating code , scalar operations

1 回表示 (過去 30 日間)
Sara
Sara 2012 年 7 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi Guys,
if k <= 0
int = x ;
return
end
int = zeros(1,length(x));
c=(k-1)/factorial(k-1);
dth2=dt/2;
lenx=length(x);
ft1=(lenx:-1:0)*dt;
for n = 3:lenx
y1 = x(2:n) ;
t1 = ft1(lenx-n+3:lenx+1) ;
y2 = x(1:n-1) ;
t2 = t1 +dt;
int(n) = sum (t1.^c.*y1 + (t2.^c).*y2)*dth2 ;
end
Is there any way to do .^c in the line ft1=(length:-1:0)*dt which is before and out of the for loop and get the same result as above code? Any suggestion would be appreciated.

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by