How to change the independent variable?

2 views (last 30 days)
张张
张张 on 14 Mar 2023
Answered: John D'Errico on 14 Mar 2023
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!

Answers (1)

John D'Errico
John D'Errico on 14 Mar 2023

Community Treasure Hunt

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

Start Hunting!