Hankelize a matrix - MATLAB Cody - MATLAB Central

Problem 3094. Hankelize a matrix

Difficulty:Rate

Similar to Problem 42501. Toeplitize a matrix, let's consider Hankelization of a matrix.

Given an input matrix A, convert it to a Hankel matrix B by replacing each skew-diagonal of A with its mean. For example,

Input

   A = [3     7    10     2
        3     5     1     2
        6     3     2     7]

Output:

   B = [3     5     7     2 
        5     7     2     2
        7     2     2     7]

Solution Stats

44.92% Correct | 55.08% Incorrect
Last Solution submitted on Jan 28, 2025

Problem Comments

Solution Comments

Show comments

Group

Project Euler II Image
Project Euler II
  • 12 Problems
  • 51 Finishers

Problem Recent Solvers135

Community Treasure Hunt

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

Start Hunting!
Go to top of page