Hi, my code is
function [A varargout] = rectangular(L,W,varargin)A = L*W;n = nargin;if n==3 varargout = L*W*varargin;endend
When I call the function using 3 variables, I get an error:
>> [a v]=rectangular(2,3,4)
Undefined operator '*' for input arguments of type 'cell'.
Error in rectangular (line 6)
varargout = L*W*varargin;
What should be replaced to make the code work?
Thanks in advance!
Best Answer