Hi Sarah Gomez,
I am not quite sure whether I understood you question correctly, but removing the syms j command is not sufficient since "j" is pre-defined as imaginary unit.
If you want to get rid of the symbolic representation, you can use anonymous functions. That would allow you to keep the rest of the code.
Your legend does not represent your used formulae correctly, that is why you could have a look at func2str().
clear;
clc;
y1 =@(x) 7 .* (-0.2).*x.*cos(7.*x + 3);
y2 =@(x) 5 .* exp(-1.1).*x.*tan(3.*x - 1);
fplot(y1, [0 30]);
hold on;
fplot(y2, [0 30]);
title({'Graph'})
xlim([0 30]);
ylim([-6 6]);
xlabel('Time, t(s)');
ylabel('Amplitude y1, y2 (mm)');
legend(func2str(y1),...
func2str(y2),'FontSize',12);
Kind regards,
Robert