Posts

Showing posts with the label Python

Developing MIMO Classes in Python

I am writing a Python codes for developing MIMO classes. Up to now, I have written my simulation codes for MIMO in Matlab. Recently, I realize that there is limitation to apply object oriented concept in Matlab programming compared to other OOP oriented languages such as Python. I now made my mind to write python codes for communication system simulations including MIMO algorithms. MIMO algorithms can be implemented by a Python code based on numpy, scipy as well as matplotlib. I found that now matplotlib offers various plotting tools, such as 2D plots, 3D plots, animation and even, saving animation pictures as mpeg files. [Parallel Processing] I found that Python also supports parallel computing for SMP, MPI and GPU systems. The related toolbox is PP. I guess that there is a computation engine supporting parallel processing.

Tips for Python Users

[File Read and Write] For opening a file, we can use open and close functions similar to c programming cases.   E.g., f = open( 'hello.txt', 'r') [For .. in ..] When we use for-in command, we must use : in the end of the line.   E.g., for line in lines: [Operators] Python use similar operator with C [Boolean operation] In Python, we can use 'and', 'or' and 'not' directly for operation   E.g., x or y [True and False] For Boolean variables, we can use True or False but not true or false [String.Split()] A string can be split to wrods in array form. my_split_words = my_phrase. split ( ) http://www.daniweb.com/software-development/python/threads/187010 [String.join()] An array can be joined into a string by the use of the join() method. >> sentence = ["there", "is", "no", "spoon"] >> string.join(sentence, " ") 'there is no spoon' [Slice for list an...