Hi Snow,
After investigating the shared code snippet, these are some following issues being identified:
- ' x*x ' is considered as matrix multiplication and as dimensions doesn't match there is an error.
- Cosine of a number is programmed as ' cos(number) '.
- The range of Y-axis is [0, 2e4] and X-axis is [0, 100]. Using 'axis equal' command will not plot the graph appropriately.
Please follow the below code to make it work:
xlabel('x = y=2t^2-3tcos2\pi60t+2');
title('homework of the Function','FontSize',12)
axis([0 50 0 50])
x = 0:100;
y=2*x.*x-3*x.*cos(2*pi*60*x)+2;
plot(y,'c:h')
%axis([0 50 0 50])
%axis equal
It is recommonded to take the free 'MATLAB Onramp' course to familiarize with programming in MATLAB.