i want to plot an log function

조회 수: 9 (최근 30일)
hassan elkholy
hassan elkholy 2020년 12월 12일
답변: VBBV 2020년 12월 12일
i want to plot this equation
y=(r^3) ln (1/r)
and i use the following code
r = 0.01:0.001:1;
y = (r^3)*log(1/r);
plot(r,y)
can you help me to plot it, because this code has error?
error is
Error using /
Matrix dimensions must agree.

답변 (1개)

VBBV
VBBV 2020년 12월 12일
%true
r = 0.01:0.001:1;
y = (r.^3).*log(1./r); %element wise
plot(r,y);grid on

카테고리

Help CenterFile Exchange에서 Log Plots에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by