cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:
cancel
Showing results for
Did you mean:

12-Amethyst

## complex

Hi community

I calculate a matrix of numbers,sometimes in the matrix there are complexes.

how can i find them, because my matrix have lot of line.

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
24-Ruby IV
(To:XDN)

@XDN wrote:

Hi community

I calculate a matrix of numbers,sometimes in the matrix there are complexes.

how can i find them, because my matrix have lot of line.

Thanks

I guess that with "complexes" you mean non-real number. After all 5 is a real number and as such its a complex number, too 😉

Not sure what exactly you have in mind if you write the you want to "find" those non-real numbers.

Here are a few suggestions - hope it helps:

Remarks:

"match" will fail if no non-real number is included in the vector

"trim" will fail if all vector elements are non-real

A workaround is to create modified "match" and "trim" functions:

Note: In Prime use "else" instead of "otherwise" and "try" instead of "on error"

7 REPLIES 7
24-Ruby IV
(To:XDN)

@XDN wrote:

Hi community

I calculate a matrix of numbers,sometimes in the matrix there are complexes.

how can i find them, because my matrix have lot of line.

Thanks

I guess that with "complexes" you mean non-real number. After all 5 is a real number and as such its a complex number, too 😉

Not sure what exactly you have in mind if you write the you want to "find" those non-real numbers.

Here are a few suggestions - hope it helps:

Remarks:

"match" will fail if no non-real number is included in the vector

"trim" will fail if all vector elements are non-real

A workaround is to create modified "match" and "trim" functions:

Note: In Prime use "else" instead of "otherwise" and "try" instead of "on error"

12-Amethyst
(To:Werner_E)

Yes ,that's exactly it

Danke

in robotic applications, the complexes show a tilting of the geometry with respect to the referential. With your solution, I know the robot positions which are out of the frame

12-Amethyst
(To:XDN)

In P7 where i find "Im"?

I don't uderstand this "IM" it is a MC15 function?

24-Ruby IV
(To:XDN)

@XDN wrote:

In P7 where i find "Im"?

I don't uderstand this "IM" it is a MC15 function?

"Im" (lower case "m"!) is a normal function also available in Prime 7 which returns the imaginary part of its argument.

Im(2-3j) -> -3 and Im(123) -> 0

So asking for Im(...) not being zero means asking for a non-real number.

The pendent to "Im" is the "Re" function which returns the real part of its argument.

I assume you are using the full version of Prime 7 and not the limited free Express version and so "Im" should be readily available. Maybe you typed an uppercase "M" instead of a lowercase one? Names (functions, variables, units) are case sensitive!
In case you are using the Express version - "Re" and "Im" are functions which are not available in Prime Express but can easily be defined using the (available) conjugate complex operator:

12-Amethyst
(To:Werner_E)

well it seems that this function is disapear in P7 ...

P7 return "error" and i don't find this function in P7 help

24-Ruby IV
(To:XDN)

@XDN wrote:

well it seems that this function is disapear in P7 ...

P7 return "error" and i don't find this function in P7 help

Looks like you are doing something wrong.

I don't have P7 installed but I sure can find the function in the P7 help.

12-Amethyst
(To:Werner_E)

I didn't find it, I'm an idiot

Thanks again Werner

Announcements