1D DCT-II transform. - MATLAB Cody - MATLAB Central

Problem 930. 1D DCT-II transform.

Difficulty:Rate

Implement a function that calculates 1D Discrete Cosine Transform (DCT-II) for each row of a given input matrix so that the outputs are in columns.

For example:

Input:

[1 0 0 0]

Gives:

mydct([1 0 0 0])
ans =
          0.5
      0.65328
          0.5
       0.2706

Solution Stats

28.81% Correct | 71.19% Incorrect
Last Solution submitted on Apr 21, 2023

Problem Comments

Solution Comments

Show comments
Registration Now Open for MathWorks AUTOMOTIVE CONFERENCE 2025
...
Hello Community, We're excited to announce that registration is now open for the...

Problem Recent Solvers19

Suggested Problems

More from this Author4

Problem Tags

dct

Community Treasure Hunt

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

Start Hunting!
Go to top of page