| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Symbolic Math Toolbox |
| Contents | Index |
| Learn more about Symbolic Math Toolbox |
d = size(A)
[m,
n] = size(A)
d = size(A, n)
Suppose A is an m-by-n symbolic or numeric matrix. The statement d = size(A) returns a numeric vector with two integer components, d = [m,n].
The multiple assignment statement [m, n] = size(A) returns the two integers in two separate variables.
The statement d = size(A, n) returns the length of the dimension specified by the scalar n. For example, size(A,1) is the number of rows of A and size(A,2) is the number of columns of A.
The statements
syms a b c d A = [a b c ; a b d; d c b; c b a]; d = size(A) r = size(A, 2)
return
d =
4 3
r =
3length, ndims in the online MATLAB Function Reference
![]() | sinint (sym) | solve | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |