I have a matrix of complex values.
If I issue the command:
plot(myMatrix)
then it shows on the graphics device a kind of scatterplot, with X-axis labeled Re(myMatrix) and Y-axis with Im(myMatrix). This shows the information I'm looking for, as I can see distinct clusters, that I cannot see with only one column.
My questions are :
- I assume there is one point per matrix row. Is it right ?
- How is calculated Re(myMatrix) for each row vector ?
It is not Re(myMatrix[1,row]), but seems to be a mix of all values of row vector. I would like to be able to get these values, so to know how to compute them with R.
No, there is one point for each matrix element.
Look for the red dot:
You'd get the same plot, if you plotted a vector instead of a matrix, i.e.,
plot(c(mat))
.This happens because
plot.default
callsxy.coords
and that function contains the following code:This means, that the fact that input is complex takes priority over it being a matrix.