help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: In GNU Emacs Calc embedded mode, how to simplify unit N/m^2 to Pa


From: Jay Belanger
Subject: Re: In GNU Emacs Calc embedded mode, how to simplify unit N/m^2 to Pa
Date: Thu, 16 May 2013 21:49:07 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

Sharad Shrestha <sharad.shrestha@gmail.com> writes:
...
> \begin{equation}
> %%% aa1 := 10 * N %%%
> aa1 \gets 10 N
> \end{equation}
>
> \begin{equation}
> %%% bb1 := 2 * m^2 %%%
> bb1 \gets 2 m^2
> \end{equation}
>
> \begin{equation}
> %%% cc1 := aa1 / bb1 => 5 * N / m^2 %%%
> \evalto cc1 \gets \frac{aa1}{bb1} \to \frac{5 N}{m^2}
> \end{equation}
>
> I can change the values assigned to aa1 and bb1, and the value of cc1
> is updated automatically.  However, the units conversion command (u c)
> has not have any effect when I try to convert the units of cc1 (fron
> N/m^2 to Pa).

Right, because cc1 is recalculated using aa1 and bb1.

> Is there a way to perform this unit conversion?

Not really.
You can fake it, to some extent, by putting the units conversion in
yourself:

uc := Pa / (N / m^2)

aa1 := 10 N

bb1 := 2 m^2

cc1 := uc aa1 / bb1 => 5 Pa

Alternatively, an algebraic units conversion function could be created,
and you could do something like

aa1 := 10 N

bb1 := 2 m^2

cc1 := uconv(aa1 / bb1, N/m^2, Pa) => 5 Pa

but I'm not sure either one is what you want.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]