フィルターのクリア

Is there a function in MATLAB to calculate higher DCTs like DCT-III, IV etc?

2 ビュー (過去 30 日間)
sahil sharma
sahil sharma 2022 年 10 月 13 日
回答済み: Matt J 2022 年 10 月 13 日
I have started learning DCT recently. I know the function dct() and dct2() are used to calculated 1-D and 2-D DCT-II repectively. Is there any function that is used to calculate the DCT-III or DCT-IV? idct() is based on DCT-III but it is not going forward into DCT domain.

採用された回答

Matt J
Matt J 2022 年 10 月 13 日

その他の回答 (1 件)

Matt J
Matt J 2022 年 10 月 13 日
編集済み: Matt J 2022 年 10 月 13 日
I don't think so, but you can always build one from fft().
function Y=dctn(X)
d=size(X);
n=numel(d);
subs0=repmat({':'},1,n);
Y=X;
for i=1:n
subs=subs0;
subs{i}=1:d(i);
Y=fft( cat(i,Y,flip(Y,i)) ,[],i);
Y=real(Y(subs{:});
end
end

カテゴリ

Help Center および File ExchangeTransforms についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by