Write a script that will display rectangles with varying curvatures and line widths, as shown in the Figure. The script will, in a loop, create a 2 by 2 subplot showing rectangles
belongs to book: MATLAB: A Practical Introduction to Programming and Problem Solving|Stormy Attaway|Fourth Edition| Chapter number:12| Question number:21.12
All Answers
total answers (1)
Ch12Ex21.m
% Display a 2 by 2 subplot of rectangles with
% varying curvatures and line widths
for i = 1:4
subplot(2,2,i)
rectangle('Position',[0.2 0.2 1 1], ...
'LineWidth', i, ...
'Curvature', [0.2*i 0.2*i])
axis([0 1.4 0 1.4])
title(sprintf('Line Width is %d', i))
end
need an explanation for this answer? contact us directly to get an explanation for this answer