Question on complex numbers and on clearing variables from memory 
Author Message
 Question on complex numbers and on clearing variables from memory

Dear friends,

I have a number z=x+jy, and I want to find its real part. I tried
real(z) but it's not recognized although I saw it in the help files. Do
I need to include a certain library for that?

My other question is whether I can clear variables after I don't need
them, to free up memory. This can be done in MATLAB with the clear
command. Is there something similar for C++?

I would appreciate any help on this.

Thanks in advance,
Elias



Wed, 02 Mar 2005 11:48:02 GMT  
 Question on complex numbers and on clearing variables from memory

Quote:

>Dear friends,

>I have a number z=x+jy, and I want to find its real part. I tried
>real(z) but it's not recognized although I saw it in the help files. Do
>I need to include a certain library for that?

>My other question is whether I can clear variables after I don't need
>them, to free up memory. This can be done in MATLAB with the clear
>command. Is there something similar for C++?

>I would appreciate any help on this.

>Thanks in advance,
>Elias

maybe you could post a bit of your code? its a bit difficult - at least for me -
to otherwise help you.


Wed, 02 Mar 2005 22:10:31 GMT  
 Question on complex numbers and on clearing variables from memory

Quote:
> Dear friends,

> I have a number z=x+jy, and I want to find its real part. I tried
> real(z) but it's not recognized although I saw it in the help files. Do
> I need to include a certain library for that?

> My other question is whether I can clear variables after I don't need
> them, to free up memory. This can be done in MATLAB with the clear
> command. Is there something similar for C++?

It sounds like you need to start with a basic C++ book and work your way up.

"Accelerated C++" by Andrew Koenig & Barbara Moo is highly recommended for
C++ beginers.

"The C++ Standard Library" by Nicolai Josuttis includes, among many other
topics, coverage of the std::complex class, which is used to represent
complex numbers in C++.

-cd



Wed, 02 Mar 2005 22:29:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Question: Representing complex numbers in C

2. simple question: complex variables

3. Idiom question: variable number of values

4. C newbie question about Variable number of arguments

5. Variable number of loops::::::::Follow up question

6. gcc and complex numbers

7. Complex numbers in C

8. Complex and Imaginary Numbers

9. complex numbers - most common ways?

10. Complex numbers

11. Complex numbers C libraries!

12. Complex number manipulation

 

 
Powered by phpBB® Forum Software