Answer:
To solve the practical question, we need to follow the steps:
A) Using MATLAB SIMULINK:
Open MATLAB and go to the SIMULINK library browser.
Drag and drop three integrator blocks and three derivative blocks onto the model canvas.
Connect the first integrator block to a sine wave block and set the frequency to 10 Hz.
Connect the output of the first integrator block to the input of the first derivative block.
Connect the output of the first derivative block to the input of the second integrator block.
Connect the output of the second integrator block to the input of the second derivative block.
Connect the output of the second derivative block to the input of the third integrator block.
Finally, connect all three integrator blocks to a scope block to display the output.
B) Using MATLAB programming:
Open MATLAB and create a new script file.
Initialize time vector t using the linspace function, with a start time of 0 and end time of 10, and a step size of 0.01.
Calculate y using the equation y = 10*sin(t).
Calculate the derivative of y using the diff function.
Calculate the integral of y using the cumtrapz function.
Create a new figure.
Plot y, the integral of y, and the derivative of y on the same plot using the plot function.
Add legends and labels to the plot.
Save the plot as a figure file using the saveas function.
Display the plot using the show function.
Here's an example MATLAB code for part B):
% Part B: MATLAB programming
% Define time vector
t = linspace(0, 10, 1001);
% Calculate y, the integration of y, and the derivative of y
y = 10*sin(t);
dy = diff(y)./diff(t);
dy = [dy(1),dy];
iy = cumtrapz(t, y);
% Plot the results
figure
plot(t, y, 'LineWidth', 2, 'DisplayName', 'y')
hold on
plot(t, iy, 'LineWidth', 2, 'DisplayName', 'Integral of y')
plot(t, dy, 'LineWidth', 2, 'DisplayName', 'Derivative of y')
xlabel('Time (s)')
ylabel('Amplitude')
title('Practical Question')
legend('Location', 'best')
grid on
% Save
Step-by-step explanation: