1. Create a MATLAB program consisting of the MATLAB code of Figure 1. Run the program and
verify that the values in the array numbers are displayed. Determine the size and value(s)
of the variable k after the loop has been executed for the program.
Example: £ox-loop versus while
clear; clc;
二 loop
numbers 120.5253
for k = 1:1:length (numbers)
val = numbers (k);
fprintt("S0.1f €; val)y
end
お pn も EN y
Figure 1. Display Numbers Code Segment
BAI TAP
Help plot
Type this command in Matlabto find out how to
use the plot command