Final answer:
To plot the function in MATLAB, use the provided code snippet, which includes labeling and grid features for clarity, then save and upload the .m file accordingly.
Step-by-step explanation:
To plot the given function f(x) = xe^{x/2} + 5x - 5 in MATLAB for the range −2 ≤ x ≤ 2, you can use the following code:
x = linspace(-2, 2);
y = x.*exp(x/2) + 5.*x - 5;
plot(x, y);
title('Plot of the function f(x) = xe^{x/2} + 5x - 5');
xlabel('x');
ylabel('f(x)');
grid on;
This code generates a plot of the function, where linspace is used to generate a vector of values for x from -2 to 2. The function values are computed in vectorized form and plotted using the plot function. The chart includes a title and axis labels. Remember, to save the .m file and upload it as required.