From: noveen on 28 Jun 2010 00:53 If i have an array (say 2 by 2 or 2 by 6 etc) how do i check if each of the elements are real or complex. I am looking for something which checks each element of the array and returns the array as it is if all elements are real and if any element is complex, it just picks up the real part and rejects the imaginary part. Basically, i want an array of realnumbers to work with.
From: Wayne King on 28 Jun 2010 01:55 "noveen " <noveenkapur(a)yahoo.co.in> wrote in message <i099rf$p9p$1(a)fred.mathworks.com>... > If i have an array (say 2 by 2 or 2 by 6 etc) how do i check if each of the elements are real or complex. I am looking for something which checks each element of the array and returns the array as it is if all elements are real and if any element is complex, it just picks up the real part and rejects the imaginary part. Basically, i want an array of realnumbers to work with. Hi x = randn(2,2)+1j*randn(2,2); real(x) imag(x) Wayne
From: us on 28 Jun 2010 02:33 "noveen " <noveenkapur(a)yahoo.co.in> wrote in message <i099rf$p9p$1(a)fred.mathworks.com>... > If i have an array (say 2 by 2 or 2 by 6 etc) how do i check if each of the elements are real or complex. I am looking for something which checks each element of the array and returns the array as it is if all elements are real and if any element is complex, it just picks up the real part and rejects the imaginary part. Basically, i want an array of realnumbers to work with. a hint: help isreal; us
|
Pages: 1 Prev: Right click menu, Picture Next: Need to Crop Sqaure Images |