matlab仿真老是出现错误,请问怎么改?clear;clc;deta=2;w=2.5;theta=0;a=linspace(-10,10,25);b=linspace(-1.0,1.0,25);[x,y]=meshgrid(a,b);s(x,y)=exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));plot3(x,y,s(x,y)); Subscript
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/25 18:20:09
matlab仿真老是出现错误,请问怎么改?clear;clc;deta=2;w=2.5;theta=0;a=linspace(-10,10,25);b=linspace(-1.0,1.0,25);[x,y]=meshgrid(a,b);s(x,y)=exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));plot3(x,y,s(x,y)); Subscript
matlab仿真老是出现错误,请问怎么改?
clear;
clc;
deta=2;w=2.5;theta=0;
a=linspace(-10,10,25);
b=linspace(-1.0,1.0,25);
[x,y]=meshgrid(a,b);
s(x,y)=exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));
plot3(x,y,s(x,y));
Subscript indices must either be real positive integers or logicals.
Error in ==> gabormeshgrid at 7
s(x,y)=exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));
matlab仿真老是出现错误,请问怎么改?clear;clc;deta=2;w=2.5;theta=0;a=linspace(-10,10,25);b=linspace(-1.0,1.0,25);[x,y]=meshgrid(a,b);s(x,y)=exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));plot3(x,y,s(x,y)); Subscript
clear; clc;
deta = 2; w = 2.5; theta = 0;
a = linspace(-10,10,25);
b = linspace(-1.0,1.0,25);
[x,y] = meshgrid(a,b);
s = exp(-0.5*((x/deta)^2+(y/deta)^2)).*sin(w*(x*cos(theta)+y*sin(theta)));
plot3(x,y,s);