cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

complex

XDN
12-Amethyst
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
Werner_E
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:

Werner_E_0-1647358507439.png

 

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:

Werner_E_1-1647359047665.png

Werner_E_2-1647359111348.png

 

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

 

 

View solution in original post

7 REPLIES 7
Werner_E
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:

Werner_E_0-1647358507439.png

 

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:

Werner_E_1-1647359047665.png

Werner_E_2-1647359111348.png

 

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

 

 

XDN
12-Amethyst
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

 

XDN
12-Amethyst
12-Amethyst
(To:XDN)

In P7 where i find "Im"?

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

Werner_E
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:

Werner_E_1-1647361089607.png

 

 

XDN
12-Amethyst
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

 

Werner_E
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.

See here: https://support.ptc.com/help/mathcad/r7.0/en/#page/PTC_Mathcad_Help%2Fcomplex_number_functions.html%...

XDN
12-Amethyst
12-Amethyst
(To:Werner_E)

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

Thanks again Werner

Announcements
Check out the latest
Mathcad Tip
"PTC Mathcad 15 / Prime 1-6 Update."