ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I format complex numbers ? (https://www.excelbanter.com/excel-discussion-misc-queries/178728-how-do-i-format-complex-numbers.html)

KS

How do I format complex numbers ?
 
When I do math operations with complex numbers, the results are shown in long
formats with many digits after the decimal point. Something like :

0.0358698745876568+0.099839597397397i

How can I change it to fewer digits? Please help!

ks


ExcelBanter AI

Answer: How do I format complex numbers ?
 
Hi ks,

Formatting complex numbers in Excel is pretty easy. You can use the "Number Format" feature to change the number of digits displayed after the decimal point.

Here are the steps to format complex numbers in Excel:
  1. Select the cell(s) containing the complex number(s) you want to format.
  2. Right-click on the selected cell(s) and choose "Format Cells" from the context menu.
  3. In the "Format Cells" dialog box, select the "Number" tab.
  4. In the "Category" list, select "Number".
  5. In the "Decimal Places" field, enter the number of digits you want to display after the decimal point.
  6. Click "OK" to apply the formatting.

Once you have done this, the complex numbers will be displayed with the specified number of digits after the decimal point.

FSt1

How do I format complex numbers ?
 
hi
can you format it with fewer decimal places ie
on the menu bar...
formatcellsnumber tabcatagory = number...then set the decimal places

regards
FSt1

"ks" wrote:

When I do math operations with complex numbers, the results are shown in long
formats with many digits after the decimal point. Something like :

0.0358698745876568+0.099839597397397i

How can I change it to fewer digits? Please help!

ks


Ron Rosenfeld

How do I format complex numbers ?
 
On Tue, 4 Mar 2008 12:08:04 -0800, ks wrote:

When I do math operations with complex numbers, the results are shown in long
formats with many digits after the decimal point. Something like :

0.0358698745876568+0.099839597397397i

How can I change it to fewer digits? Please help!

ks


Complex numbers, in Excel, are entered as strings.

You have to round the real and imaginary parts separately, and then recombine
them.

e.g.

=COMPLEX(ROUND(IMREAL(A1),3),ROUND(IMAGINARY(A1),3 ),RIGHT(A1,1))

(although if your suffix is always an "i" or a "j", you can change the
RIGHT(A1,1) to "i" or "j").
--ron

KS

How do I format complex numbers ?
 
Ron,

Thank you very much. It worked!

Regards,
ks


"Ron Rosenfeld" wrote:

On Tue, 4 Mar 2008 12:08:04 -0800, ks wrote:

When I do math operations with complex numbers, the results are shown in long
formats with many digits after the decimal point. Something like :

0.0358698745876568+0.099839597397397i

How can I change it to fewer digits? Please help!

ks


Complex numbers, in Excel, are entered as strings.

You have to round the real and imaginary parts separately, and then recombine
them.

e.g.

=COMPLEX(ROUND(IMREAL(A1),3),ROUND(IMAGINARY(A1),3 ),RIGHT(A1,1))

(although if your suffix is always an "i" or a "j", you can change the
RIGHT(A1,1) to "i" or "j").
--ron


Ron Rosenfeld

How do I format complex numbers ?
 
On Wed, 5 Mar 2008 07:37:04 -0800, ks wrote:

Ron,

Thank you very much. It worked!

Regards,
ks


You're welcome. Glad to help. Thanks for the feedback.
--ron


All times are GMT +1. The time now is 04:53 AM.

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