Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 4ca01cc2 authored by hhakim's avatar hhakim
Browse files

Verify matfaust.toeplitz r and c arguments and allow to pass indifferently a...

Verify matfaust.toeplitz r and c arguments and allow to pass indifferently a row-vector or a column-vector.
parent a579cbde
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,9 @@ function T = toeplitz(c, varargin) ...@@ -22,6 +22,9 @@ function T = toeplitz(c, varargin)
else else
r = c; % default r r = c; % default r
end end
if ~ ismatrix(r) || ~ ismatrix(c) || ~ isnumeric(c) || ~ isnumeric(r)
error('r and c must be numeric vectors')
end
if size(c, 2) == 1 if size(c, 2) == 1
c = c.'; c = c.';
elseif size(c, 1) ~= 1 elseif size(c, 1) ~= 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment