i want to plot an log function

5 Ansichten (letzte 30 Tage)
hassan elkholy
hassan elkholy am 12 Dez. 2020
Beantwortet: VBBV am 12 Dez. 2020
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.

Antworten (1)

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

Kategorien

Mehr zu Log Plots finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by