向matlab高手请教曲面拟合的问题现有一组三维数据,进行了如下编码,总是出现错误,x=[2.66% 3.51% 5.26% 6.59% 2.53% 3.51% 6.09% 6.80% 2.45% 3.94% 6.76% 2.38% 4.07% 6.82% 9.20%12.87%]; y=[4.01% 4.11% 4.23% 4.43% 1.42% 1.62% 1.
来源:学生作业帮助网 编辑:六六作业网 时间:2024/11/28 13:26:24
向matlab高手请教曲面拟合的问题现有一组三维数据,进行了如下编码,总是出现错误,x=[2.66% 3.51% 5.26% 6.59% 2.53% 3.51% 6.09% 6.80% 2.45% 3.94% 6.76% 2.38% 4.07% 6.82% 9.20%12.87%]; y=[4.01% 4.11% 4.23% 4.43% 1.42% 1.62% 1.
向matlab高手请教曲面拟合的问题
现有一组三维数据,进行了如下编码,总是出现错误,
x=[2.66% 3.51% 5.26% 6.59% 2.53% 3.51% 6.09% 6.80% 2.45% 3.94% 6.76% 2.38% 4.07% 6.82% 9.20%12.87%];
y=[4.01% 4.11% 4.23% 4.43% 1.42% 1.62% 1.86% 2.12% 0.65% 0.73% 0.81% 0.25% 0.29% 0.32% 0.35% 0.41%];
z=[78.86 77.14 66.86 53.14 96.00 89.14 70.29 60.00 121.71 113.14 73.71 123.43 126.86 82.29 54.86 44.57];
scatter(x,y,5,z)
figure
[X,Y,Z]=griddata(x,y,z,linspace(-4.2,4.2)',linspace(0.8,34),'v4');
pcolor(X,Y,Z);shading interp
figure,contourf(X,Y,Z)
figure,surf(X,Y,Z)
运行完后显示有以下错误:
y=[4.01% 4.11% 4.23% 4.43% 1.42% 1.62% 1.86% 2.12% 0.65% 0.73% 0.81% 0.25% 0.29% 0.32% 0.35% 0.41%];
|
Error:The expression to the left of the equals sign is not a valid target for an assignment.
向matlab高手请教曲面拟合的问题现有一组三维数据,进行了如下编码,总是出现错误,x=[2.66% 3.51% 5.26% 6.59% 2.53% 3.51% 6.09% 6.80% 2.45% 3.94% 6.76% 2.38% 4.07% 6.82% 9.20%12.87%]; y=[4.01% 4.11% 4.23% 4.43% 1.42% 1.62% 1.
x=[2.66 3.51 5.26 6.59 2.53 3.51 6.09 6.80 2.45 3.94 6.76 2.38 4.07 6.82 9.20 12.87]/100;
y=[4.01 4.11 4.23 4.43 1.42 1.62 1.86 2.12 0.65 0.73 0.81 0.25 0.29 0.32 0.35 0.41]/100;
% 改成这样就可以了,matlab 不能对%进行运算( “%” 后仅作注释用,其后字符不参与运算)