How to put "."after variables in a function for mesh command

1 次查看(过去 30 天)
nc=10;
[D,delta_z] = meshgrid(((-1:1/nc:1)*2.5+7.5)*1.68,((-1:1/nc:1)*0.4+0.6)*1.68);
y1=(7497*D)/3125 - (97253*delta_z)/20000 - (3879766636486669*((2*D)/5 - 3)^2)/562949953421312 - (6722354278789913*((5*delta_z)/2 - 3/2)^2)/1125899906842624 + 6971452376402099829/109951162777600000;
mesh (D,delta_z,y1)
How to put "." after variables correctly in this code?

采纳的回答

Wan Ji
Wan Ji 2021-8-15
Those with matrix times matrix or nth power of a matrix should be used with '.'
nc=10;
[D,delta_z] = meshgrid(((-1:1/nc:1)*2.5+7.5)*1.68,((-1:1/nc:1)*0.4+0.6)*1.68);
y1=(7497*D)/3125 - (97253*delta_z)/20000 - ...
(3879766636486669*((2*D)/5 - 3).^2)/562949953421312 ...
- (6722354278789913*((5*delta_z)/2 - 3/2).^2)/1125899906842624 ...
+ 6971452376402099829/109951162777600000;
mesh (D,delta_z,y1)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by