Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 802. Create a matrix from a cell

Created by Aurelien Queffurust

In this problem , you must convert a cell into a matrix and pad each cell with NaN.

Example 1:

If you have the input cell:

C = {[1 2 3],[]}

the output must be the matrix :

    output = [  1     2     3
               NaN   NaN   NaN]

Example 2:

C = {[1 2 3],8,[],[15  3]}

the output must be the matrix :

       1     2     3
       8   NaN   NaN
     NaN   NaN   NaN
      15     3   NaN

Tags

Problem Group

Solution Statistics

52 correct solutions 16 incorrect solutions
Last solution submitted on Jul 05, 2014

Solution Comments