How to change the independent variable?

x=linspace(0,1,1024);
n=1:1024;
f(n)=2.*x.*x.*cos(12.*pi.*x).*(1-x).^4;
plot(f)
The image is not made with x as the independent variable.How can I solve this problem?Thanks!

Asked:

on 14 Mar 2023

Answered:

on 14 Mar 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!