Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I have the following code for MATLAB % Exercise 5 clear all; clc; ts=1/(50*500);

ID: 2291150 • Letter: I

Question

I have the following code for MATLAB
% Exercise 5 clear all; clc; ts=1/(50*500);% Sampling interval t=0:ts:2; % Time vector from 0. to 1 y=-sign(t-0.5);% Function %for N=5 n1=[-5:5]; Dn1=((j*0.5*pi).*n1).*(exp((-j*pi).*n1)).*((sinc((0.5.*n1)).^2)); ex1=exp((j*2*pi).*(n1'.*t)); y1=(Dn1*ex1); figure(5); subplot (3,1,1);plot(t,y1,t,y); title ('Projection for N=5');xlabel('Time(s)');ylabel('f(t)'); legend('Projection','f(t)=-sign(t-0.5)')




Without messing with the code further as it works. How would I change the title of the figure where it says “Figure 5:%%%%%%%%%%%%%%%%%”
That’s all I want to know please % Exercise 5 clear all; clc; ts=1/(50*500);% Sampling interval t=0:ts:2; % Time vector from 0. to 1 y=-sign(t-0.5);% Function %for N=5 n1=[-5:5]; Dn1=((j*0.5*pi).*n1).*(exp((-j*pi).*n1)).*((sinc((0.5.*n1)).^2)); ex1=exp((j*2*pi).*(n1'.*t)); y1=(Dn1*ex1); figure(5); subplot (3,1,1);plot(t,y1,t,y); title ('Projection for N=5');xlabel('Time(s)');ylabel('f(t)'); legend('Projection','f(t)=-sign(t-0.5)')




Without messing with the code further as it works. How would I change the title of the figure where it says “Figure 5:%%%%%%%%%%%%%%%%%”
That’s all I want to know please Projection for N-5 Projection f(t)--signit-0.5) 0.5 0.5 -1 0.5 2 Time(s) Projection for N=15 _ f(t)=-signit-0.5) 0.5 0.5 -1 0.5 2 Time(s) Projection for N 50 Projection -f(t)=-sign(t-0.5) 0.5 0.5 -1 0.5 Time(s)

Explanation / Answer

% Exercise 5

clear all; clc;

ts=1/(50*500);% Sampling interval

t=0:ts:2; % Time vector from 0. to 1

y=-sign(t-0.5);% Function

%for N=5

n1=[-5:5];

Dn1=((j*0.5*pi).*n1).*(exp((-j*pi).*n1)).*((sinc((0.5.*n1)).^2));

ex1=exp((j*2*pi).*(n1'.*t));

y1=(Dn1*ex1);

figure(5);

subplot (3,1,1);plot(t,y1,t,y);

title ('“Figure 5:%%%%%%%%%%%%%%%%%');

xlabel('Time(s)');

ylabel('f(t)');

legend('Projection','f(t)=-sign(t-0.5)')