i want to plot an log function

1 次查看(过去 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