用matlab画x*sin(x)的图

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 09:29:58
用matlab画x*sin(x)的图

用matlab画x*sin(x)的图
用matlab画x*sin(x)的图

用matlab画x*sin(x)的图
clear all;clc;
y=@(x)x.*sin(x);
ezplot(y);grid on;
--------------------------
或者用数值方法(建议使用数值方法)
clear all;clc;
x=-2*pi:pi/20:2*pi;
y=x.*sin(x);
plot(x,y);grid on;

syms x

ezplot(x*sin(x))