Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to input Log function

Subject: How to input Log function

From: Thomas Khoo

Date: 5 Sep, 2007 17:18:44

Message: 1 of 7

HI,

How do i input a log base e into matlab? log base e is ln
is there a way to input ln function?

Subject: How to input Log function

From: carlos lopez

Date: 5 Sep, 2007 17:27:56

Message: 2 of 7

"Thomas Khoo" <tamusi@gmail.com> wrote in message
<fbmodk$amc$1@fred.mathworks.com>...
> HI,
>
> How do i input a log base e into matlab? log base e is ln
> is there a way to input ln function?
Are you talking about log(x)?
My suggestion:
help log
help log10
Regards
Carlos

Subject: How to input Log function

From: Thomas Khoo

Date: 6 Sep, 2007 01:45:03

Message: 3 of 7

"carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote in
message <fbmous$h2o$1@fred.mathworks.com>...
> "Thomas Khoo" <tamusi@gmail.com> wrote in message
> <fbmodk$amc$1@fred.mathworks.com>...
> > HI,
> >
> > How do i input a log base e into matlab? log base e is
ln
> > is there a way to input ln function?
> Are you talking about log(x)?
> My suggestion:
> help log
> help log10
> Regards
> Carlos

Hi, not the log(x) function
Its log with (base) e and not with (base) 10
LOGe(10)

Subject: How to input Log function

From: rocwoods

Date: 6 Sep, 2007 02:13:36

Message: 4 of 7

"Thomas Khoo" <tamusi@gmail.com> wrote in message
<fbnm2v$263$1@fred.mathworks.com>...
> "carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote
in
> message <fbmous$h2o$1@fred.mathworks.com>...
> > "Thomas Khoo" <tamusi@gmail.com> wrote in message
> > <fbmodk$amc$1@fred.mathworks.com>...
> > > HI,
> > >
> > > How do i input a log base e into matlab? log base e
is
> ln
> > > is there a way to input ln function?
> > Are you talking about log(x)?
> > My suggestion:
> > help log
> > help log10
> > Regards
> > Carlos
>
> Hi, not the log(x) function
> Its log with (base) e and not with (base) 10
> LOGe(10)


In MATLAB log(x) means LOGe(x),that is ln(x);and log10(x)
means lg(x).

Subject: How to input Log function

From: Thomas Khoo

Date: 8 Sep, 2007 02:12:34

Message: 5 of 7

Hi its possible to input ln(x) into matlab and run? Have
tried but matlab would give an undefinded
command/function 'ln' when i run the code lets say y = ln(3)



"rocwoods " <rocwoods@yeah.net> wrote in message
<fbnnog$mlg$1@fred.mathworks.com>...
> "Thomas Khoo" <tamusi@gmail.com> wrote in message
> <fbnm2v$263$1@fred.mathworks.com>...
> > "carlos lopez" <clv2clv_00000000_@adinet.com.uy> wrote
> in
> > message <fbmous$h2o$1@fred.mathworks.com>...
> > > "Thomas Khoo" <tamusi@gmail.com> wrote in message
> > > <fbmodk$amc$1@fred.mathworks.com>...
> > > > HI,
> > > >
> > > > How do i input a log base e into matlab? log base e
> is
> > ln
> > > > is there a way to input ln function?
> > > Are you talking about log(x)?
> > > My suggestion:
> > > help log
> > > help log10
> > > Regards
> > > Carlos
> >
> > Hi, not the log(x) function
> > Its log with (base) e and not with (base) 10
> > LOGe(10)
>
>
> In MATLAB log(x) means LOGe(x),that is ln(x);and log10(x)
> means lg(x).

Subject: How to input Log function

From: us

Date: 8 Sep, 2007 02:22:00

Message: 6 of 7

Thomas Khoo:
<SNIP seems to have a reader's block...

> Hi its possible to input ln(x) into matlab and run? Have
> tried but matlab would give an undefinded
> command/function 'ln' when i run the code lets say
> y = ln(3)

rather than repeating your question over and over, you
should carefully read what others have told you...

us

Subject: How to input Log function

From: Walter Roberson

Date: 8 Sep, 2007 02:58:51

Message: 7 of 7

"Thomas Khoo" <tamusi@gmail.com> wrote in message
<fbt0eh$1dj$1@fred.mathworks.com>...
> Hi its possible to input ln(x) into matlab and run?

Yes, all you have to do is start your session by
typing at the command line,

ln = @log;

After that, ln(x) will work at the command line
for that session. To get it to work within a program,
create a file named ln.m that contains

function thelog = ln(x)
thelog = log(x)



Sorry for the confusion; we thought you were asking
what Matlab's logarithm base e function is named (it is
named 'log'), when all along you were asking how to get the
specific name 'ln' to return logarithm base e.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us