Ch12Ex14.m % Plot line y = x with a random thickness x = [2 5]; y = x; hdl = plot(x,y); title('Line with random thickness') set(hdl,'LineWidth',randi([1 10]))
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:12| Question number:15.12
All Answers
total answers (1)
Ch12Ex15.m
y = [33 22 17 32 11];
z = [3 7 2 9 4 6 2 3];
figure(1)
yhand = plot(y);
figure(2)
zhand = plot(z);
somecolors = 'bgrcmyk';
somemarkers = '.ox+*sd';
set(yhand,'LineWidth',3, ...
'Color',somecolors(randi(length(somecolors))))
set(zhand,'LineWidth',4,...
'Color',somecolors(randi(length(somecolors))))
set(yhand, 'Marker',...
somemarkers(randi(length(somemarkers))))
set(zhand, 'Marker', ...
somemarkers(randi(length(somemarkers))))
need an explanation for this answer? contact us directly to get an explanation for this answer