作业帮 > 综合 > 作业

Matlab平方怎么输入

来源:学生作业帮 编辑:作业帮 分类:综合作业 时间:2024/05/12 13:44:38
Matlab平方怎么输入
t=(-10*pi:0.001:10*pi);
y= mpower(sin(5*t),2);
plot(t,y,'-b')
grid on
axis tight
为什么提示错误?
you can type
y= sin(5*t).^2
再问: 为什么要加"."??
再答: because your t is a vector .* means the process is pixel by pixel