📊

Module 6 Video - readmatrix: Acquiring Numeric Data from Excel: Part 2

Mar 7, 2025

Reading Data from Workbooks with Non-numeric Leading Rows/Columns

Introduction

  • Discusses how to handle cases where numeric data in a workbook is preceded by non-numeric leading rows/columns.

Handling Leading Blank Rows/Columns

  • Scenario: Rectangular block of numeric data preceded by blank rows/columns.
  • Example: Demo workbook (demo workbook.xlsx) demo three sheet.
  • Outcome: readmatrix function effectively determines the used range.
    • Ignores leading blank rows and columns.

Headers with Text Information

  • Common Scenario: Spreadsheets with header rows/columns containing text.
  • Single Row of Text Headers:
    • Example: Demo workbook sheet demo 4.
    • Outcome: readmatrix ignores a single row of text information.
  • Multiple Rows of Text Headers:
    • Example: Sheet demo 5.
    • Outcome: readmatrix ignores multiple rows (e.g., row 1 and 2) of text.

Descriptive Columns on the Left

  • Scenario: Columns with non-numeric descriptive information on the left of the data block.
  • Example: Sheet demo 6.
  • Outcome:
    • readmatrix attempts to read the non-numeric columns.
    • Non-numeric data is read as NaN (Not a Number) in MATLAB.
    • NaN is a MATLAB designation for non-numeric entities, used for text when reading numeric data.

Upcoming Content

  • Future video topics include cases where numeric data is not in a rectangular block.
  • Will explore situations with blank cells or interspersed text within numeric data blocks.
  • Focus on less straightforward automatic detection scenarios.