Ubuntu Forums Archive Viewer

Removing complex number in Octave

Archived thread 1025604 from Education & Science. Markdown source: Education_&_Science/thread_1025604_Removing_complex_number_in_Octave.md

Original URL About this archive
#1

I have generated some output from a script. However, all my values have a complex number term. E.g. 1.431333666746343+0i 4.691718399388015+0i 8.164995189955654+0i 10.03549833370017+0i 9.839658275734035+0i 9.587387724841385+0i 9.283021138629051+0i 8.845012465839011+0i

Is there a way to remove the +0i term since the real no. term is my actual result?

Solved: By writing real(data), it displays only the real no. term. Similarly, imag(data) will display the imaginary term.