Write a function plotexvar that will plot data points represented by x and y vectors which are passed as input arguments
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:12| Question number:16.12
All Answers
total answers (1)
plotexvar.m
function plotexvar(x,y,varargin)
n = nargin;
han = plot(x,y);
title(sprintf('%d Arguments',n))
if n==3
set(han,'LineWidth',varargin{1})
elseif n==4
set(han,'LineWidth',varargin{1},...
'Color',varargin{2})
end
need an explanation for this answer? contact us directly to get an explanation for this answer