dst2(U)
function out = dst2(U)
% DST calculate the 2D discrete sign transform of function y.
N = length(U);
A = zeros(N-1,N-1);
for m=1:N-1
for n=1:N-1
holder = 0;
for i=1:N-1
for j=1:N-1
holder = holder + ...
1 / (N - 1)^2 * ...
( U(i,j) * sin(pi * m * (i-1) / (N-1)) * ...
sin(pi * n * (j-1) / (N-1)) + ...
U(i,j+1) * sin(pi * m * (i-1) / (N-1)) * ...
sin(pi * n * j / (N-1)) + ...
U(i+1,j) * sin(pi * m * i / (N-1)) * ...
sin(pi * n * (j-1) / (N-1)) + ...
U(i+1,j+1) * sin(pi * m * i / (N-1)) * ...
sin(pi * n * j / (N-1)) );
end
end
A(m,n) = holder;
end
end
out = A;
Cite As
Koorosh Gobal (2026). dst2(U) (https://uk.mathworks.com/matlabcentral/fileexchange/49864-dst2-u), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform Compatibility
Windows macOS LinuxCategories
- Signal Processing > Signal Processing Toolbox > Transforms, Correlation, and Modeling > Transforms >
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
