Question: Suppress the complex components

Hello,

How can I do to suppress all the complex components of a vector ? Is there a simple code to do this?

For example, I would like to replace the complex components with zero.

If the considered vector is a:= [2+I,2,5], i would like to obtain after modifications amod:= [0,2,5] ou amod  [Nothing,2,5]

VectorWithComplexComponents.mw

Nota :

The origin of my issue is to be able to plot points with the following syntax :

pointplot([tp,xp,symbol = solidcircle,color=black,symbolsize = 10): where xp is a vector with, sometimes, some complex components. 

I would like to plot the points only for the real components of xp

Thanks a lot for your help

 

 

Please Wait...