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

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

complex

XDN
14-Alexandrite
14-Alexandrite

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

 

ACCEPTED SOLUTION

Accepted Solutions
Werner_E
25-Diamond I
(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
25-Diamond I
(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
14-Alexandrite
14-Alexandrite
(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
14-Alexandrite
14-Alexandrite
(To:XDN)

In P7 where i find "Im"?

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

Werner_E
25-Diamond I
(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
14-Alexandrite
14-Alexandrite
(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
25-Diamond I
(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%23wwID0EG5UEB

XDN
14-Alexandrite
14-Alexandrite
(To:Werner_E)

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

Thanks again Werner

Announcements

Top Tags