ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Round-down complex numbers (https://www.excelbanter.com/excel-discussion-misc-queries/68986-round-down-complex-numbers.html)

nsv

Round-down complex numbers
 

I have some results, that come out as complex numbers. They are
displayed in their full 15+ digit splendour, eg.
1.61189030772451+2.80510780824785i
which is a bit difficult to read.

Is it possible to round them down or display them with fewer digits?

NSV


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=507597


Pete

Round-down complex numbers
 
You probably have some formula like = A1 & B1 & "i" to display this.
Change this to:

=TEXT(A1,"0.0") & TEXT(B1,"0.0") & "i"

to display the numbers to one decimal place.

Hope this helps.

Pete


nsv

Round-down complex numbers
 

No, this is not the way complex calculations work.
My formula could eg. go like this in cell A3: COMPLEX(A1;A2) which
leaves a complex number based on the input from cell A1 and A2.

I know it is possible write IMREAL(A3) in cell B1 and IMAGINARY(A3) in
cell B2, round them of to a few digits and then write =B1&" + j"&B2 in
cell B3, but that is not the smart solution I look for.


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=507597


Ron Rosenfeld

Round-down complex numbers
 
On Thu, 2 Feb 2006 05:34:53 -0600, nsv
wrote:


I have some results, that come out as complex numbers. They are
displayed in their full 15+ digit splendour, eg.
1.61189030772451+2.80510780824785i
which is a bit difficult to read.

Is it possible to round them down or display them with fewer digits?

NSV


If you are producing these by using the COMPLEX worksheet (ATP) function, then
merely round the real coefficient.

e.g.

= COMPLEX(ROUND(A1,2),A2)


--ron

Pete

Round-down complex numbers
 
Oh well, it was a guess on my part - I've never used the COMPLEX( )
functions.

Sorry I couldn't help in this case.

Pete


Ron Rosenfeld

Round-down complex numbers
 
On Thu, 02 Feb 2006 07:54:30 -0500, Ron Rosenfeld
wrote:

On Thu, 2 Feb 2006 05:34:53 -0600, nsv
wrote:


I have some results, that come out as complex numbers. They are
displayed in their full 15+ digit splendour, eg.
1.61189030772451+2.80510780824785i
which is a bit difficult to read.

Is it possible to round them down or display them with fewer digits?

NSV


If you are producing these by using the COMPLEX worksheet (ATP) function, then
merely round the real coefficient.

e.g.

= COMPLEX(ROUND(A1,2),A2)


--ron


Or, round both the real and the imaginary coefficients:

=COMPLEX(ROUND(A1,2),ROUND(A2,2))


--ron

nsv

Round-down complex numbers
 

OK, Pete - complex numbers are, well, complex and I guess they are not
very much used outside the area of calculations with electric power at
50/60 Hz. Other spreadsheets used to be more "complex friendly", but
Excel has given complex numbers a low priority in userfriendlyness and
it is quite a task to write the calculations into the formulas.

Ron - thanks for the tip, but as you can see my formulas reach a bit
further than just using the COMPLEX function.
I seek at format that works for complex numbers just like it does for
real numbers, but I suppose it doesn't exist.


--
nsv
------------------------------------------------------------------------
nsv's Profile: http://www.excelforum.com/member.php...o&userid=26500
View this thread: http://www.excelforum.com/showthread...hreadid=507597


Ron Rosenfeld

Round-down complex numbers
 
On Thu, 2 Feb 2006 08:35:11 -0600, nsv
wrote:


OK, Pete - complex numbers are, well, complex and I guess they are not
very much used outside the area of calculations with electric power at
50/60 Hz. Other spreadsheets used to be more "complex friendly", but
Excel has given complex numbers a low priority in userfriendlyness and
it is quite a task to write the calculations into the formulas.

Ron - thanks for the tip, but as you can see my formulas reach a bit
further than just using the COMPLEX function.
I seek at format that works for complex numbers just like it does for
real numbers, but I suppose it doesn't exist.


I believe that's a design issue. If I am not mistaken, the complex numbers are
actually stored, in the cell, as a text string. So you would have to actually
round the numbers before displaying.

This is different from values that are stored as numbers, where formatting
changes only the way in which the numbers are "displayed" and do not change the
actual value that is stored.

I suppose you could leave the calculations in a 'hidden' cell, and use a
"rounded" cell for display purposes. That would certainly be more complex.


--ron


All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com