Q:

Write a script that will draw the line y=x between x=2 and x=5, with a random line width between 1 and 10

0

Write a script that will draw the line y=x between x=2 and x=5, with a random line width between 1 and 10.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

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]))

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now