how do these function (separate functions)
clc; clear;
input=[‘MATLAB’];
for i= 1:length(input)
fprintf(input(1:i))
fprintf(‘n’)
end
%—————————————————————————————–
clc; clear;
for j=length(input):-1:2
fprintf(input(1:j-1))
fprintf(‘n’)
end
for x= 5:-1:1
msg=[];
for y = 1 : x
number= x*y;
msg = [msg number];
end
disp(msg);
end
%—————————————————————————————–
clc; clear;
height = 10;
for i= 1:height;
for j= i:height;
if mod(i,2)==0
fprintf ‘O’
else
fprintf ‘X’
end
end
fprintf ‘n’
endclc; clear;
input=[‘MATLAB’];
for i= 1:length(input)
fprintf(input(1:i))
fprintf(‘n’)
end
%—————————————————————————————–
clc; clear;
for j=length(input):-1:2
fprintf(input(1:j-1))
fprintf(‘n’)
end
for x= 5:-1:1
msg=[];
for y = 1 : x
number= x*y;
msg = [msg number];
end
disp(msg);
end
%—————————————————————————————–
clc; clear;
height = 10;
for i= 1:height;
for j= i:height;
if mod(i,2)==0
fprintf ‘O’
else
fprintf ‘X’
end
end
fprintf ‘n’
end clc; clear;
input=[‘MATLAB’];
for i= 1:length(input)
fprintf(input(1:i))
fprintf(‘n’)
end
%—————————————————————————————–
clc; clear;
for j=length(input):-1:2
fprintf(input(1:j-1))
fprintf(‘n’)
end
for x= 5:-1:1
msg=[];
for y = 1 : x
number= x*y;
msg = [msg number];
end
disp(msg);
end
%—————————————————————————————–
clc; clear;
height = 10;
for i= 1:height;
for j= i:height;
if mod(i,2)==0
fprintf ‘O’
else
fprintf ‘X’
end
end
fprintf ‘n’
end matlab MATLAB Answers — New Questions