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

조회 수: 1 (최근 30일)
ly
ly 2021년 8월 15일
답변: Wan Ji 2021년 8월 15일
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