%% Call Python Methods with Numeric Arguments
% This example shows how to call the Python math.fsum function, which sums the floating-point values in an iterable input argument.
% Open the MATLAB® patients.mat data file and read the numeric array Height.

load patients.mat
class(Height)

%
% MATLAB automatically converts the numeric values to Python numeric values. However, Height is a 100-by-1 array, and MATLAB must pass a 1-by-N array to a Python iterable argument.

size(Height)

%
% Transform Height to a 1-by-N matrix before calling fsum.

py.math.fsum(Height')

%
% Copyright 2012 The MathWorks, Inc.