Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 930. 1D DCT-II transform.

Created by Ryszard Maciol

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

Tags

Problem Group

Solution Statistics

29 correct solutions 61 incorrect solutions
Last solution submitted on May 27, 2016

Solution Comments