Question: Use MATLAB to draw your first or last name's initial. The sample code shown below produces such a drawing of the last letter of the

 Use MATLAB to draw your first or last name's initial. The

Use MATLAB to draw your first or last name's initial. The sample code shown below produces such a drawing of the last letter of the Russian alphabet. The mathematical concept used in this code is the fact that equation x = a + (b - a)t, where 0 lessthanorequalto t lessthanorequalto 1, defines a segment [a, b]. %Draw the letter t = [0:0.01:1]; % parameter used to construct all segments xmin_1 = 0.3; ymin_1 = 0.05; xmax_1 = 0.7; ymax_1 = 0.5; % coordinates of end points of the 1st segment x_1 = min_1 + (xmax_1 - xmin_1) * t; y_1 = ymin_1 + (ymax_1 - ymin_1) *t; %1st segment of the letter xmin_2 = 0.7; ymin_2 = 0.05 x_max_2 = 0.7;ymax_2 = 0.95; x_2 = xmin_2 + (xmax_2 - xmin_2) *t; y_2 = ymin_2 + (ymax_2 - ymin_2)*t; %2n segment of the letter xmin_3 = 0.7; ymin_3 = 0.95; xmax_3 = 0.45; ymax_3 = 0.8; x_3 = xmin_3 + (xmax_3 - xmin_3)*t; y_3 = ymin_3 + (ymax_3 - ymin_3)*t; %3rd segment of the letter xmin_4 = 0.45; ymin_4 = 0.8; xmax_4 = 0.45; ymax_4 = 0.65; x_4 = xmin_4 + (xmax_4 - xmin 4)*t; y_4 = ymin_4 + (ymax_4 - ymin_4)*t; %4th segment of the letter xmin_5 = 0.4 5; ymin_5 = 0.65; xmax_5 = 0.67; ymax_5 = 0.47; x_5 = xmin_5 + (xmax_5 - xmin 5)*t; y_5 = ymin_5 + (ymax_5 - ymin_5)*t; % 5th segment of the letter x_letter = [x_1 x_2 x_3 x_4 x_5]; y_letter = [y_1 y_2 y_3 y_4 y_5]; % put all segments together into a letter figure (401); %open a new figure and name it "figure 401" plot (x_letter, y_letter, 'k') axis ([0 1 0 1]) % plot the letter inside the rectangle [0 1] times [0 1]; % the option 'k' specifies the color (black) Write a code to draw your initial, and produce a plot of the letter. See the answer sheet for the format of submission of your work

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!