# mxGetScalar

## Purpose

Get the (1,1) element of a Matrix.

## C Synopsis

    double mxGetScalar(pm)
      Matrix *pm;

## Fortran Synopsis

    real*8 function mxGetScalar(pm)
    integer*4 pm

## Arguments

`pm`
  pointer to Matrix structure

## Description

This routine offers a quick and easy way to obtain the value of a Matrix that contains a scalar. If a Matrix is larger than 1-by-1, this routine returns the value of the (`1,1`) element.

(c) Copyright 1994 by The MathWorks, Inc.