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

1 visualización (últimos 30 días)
ly
ly el 15 de Ag. de 2021
Respondida: Wan Ji el 15 de Ag. de 2021
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?

Respuesta aceptada

Wan Ji
Wan Ji el 15 de Ag. de 2021
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)

Más respuestas (0)

Categorías

Más información sobre Surface and Mesh Plots en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by