A story about my new study of Python after 3 years of MATLAB experience

1. How to learn Python

I am a graduate student in science who is about to get a job in April of this year. I have been simulating using MATLAB for three years in the laboratory.

So far, I've been using MATLAB, which is licensed by the university. If you become a member of society, you will not be able to use MATLAB, so The other day, I decided to learn new Python that can be used for free.

First of all, go to Yurindo in Yokohama, pick up all the Python reference books, I chose a reference book that seems to suit me.

That's how I chose, written by Dr. Akio Nishi. "I can't explain it any more easily! The first step in Python ” is. I recommend it because it is easy to understand!

2. What I thought about learning Python

In fact, I will learn Python and write what I thought.

Frankly, I thought it was similar to MATLAB and easy to learn. It was an interpreter type, and I didn't come up with such a difficult concept.

However, among them, there are two things that I struggled with, and I would like to introduce them.

2.1 Number at the beginning of the array index

The first is about array indexes. In MATLAB, the index started at "1", In Python, the index starts at "0". To be honest, I'm still unfamiliar with this.

number.m


%For MATLAB
number = [1,2,3]
%The index that specifies 1 is 1(number[1]=1)
%The index that specifies 2 is 2(number[2]=2)
%The index that specifies 3 is 3(number[3]=3)

number.py


#For Python
number = [1,2,3]
#Index that specifies 1 is 0(number[0]=1)
#The index that specifies 2 is 1(number[1]=2)
#The index that specifies 3 is 2(number[2]=3)

2.2 Class concept

And the second is about classes (and object-oriented). I have never developed a large-scale system before, When writing a simulation program in the laboratory I came with a stance that I should move for the time being, so I couldn't understand it easily. (Still quite suspicious)

In addition to the reference book, Do you need a "class"? Isn't it okay with the def function? "A class is a collection of data and functions that are related to each other to make the code easier to read. It's something, "I somehow convinced.

Future goals

In the future, I would like to use various libraries unique to Python. In particular, I have a strong interest in machine learning, so I would like to use TensorFlow.

Recommended Posts

A story about my new study of Python after 3 years of MATLAB experience
A story about Python pop and append
The story of blackjack A processing (python)
A note about the python version of python virtualenv
A story about running Python on PHP on Heroku
A story about modifying Python and adding functions
A story about trying to introduce Linter in the middle of a Python (Flask) project
A story about making Hanon-like sheet music with Python
A story about trying a (Golang +) Python monorepo with Bazel
A story about changing the master name of BlueZ
Tasks at the start of a new python project
A story that stopped my heart after upgrading OpenStack
A reminder about the implementation of recommendations in Python
A story about stumbling through PATH after installing anaconda
(First post) A story about numerical calculation of influenza and new pneumonia coronavirus with Tensorflow
A memorandum of stumbling on my personal HEROKU & Python (Flask)
A story about how to specify a relative path in python.
A story about an amateur making a breakout with python (kivy) ②
A story about an amateur making a breakout with python (kivy) ①
A story about clustering time series data of foreign exchange
A story about trying to implement a private variable in Python.
A story about a python beginner stuck with No module named'http.server'
A story about a person who uses Python addicted to the judgment of an empty JavaScript dictionary
About the ease of Python
About various encodings of Python 3
A memorandum about correlation [Python]
A memorandum about Python mock
About the features of Python
A note about [python] __debug__
[Python] A workaround based on common errors and my past experience
A story about adding a REST API to a daemon made with Python
A story that struggled to handle the Python package of PocketSphinx
The story of making a standard driver for db with python.
A story about developing a soft type with Firestore + Python + OpenAPI + Typescript
A story about trying to run multiple python versions (Mac edition)
After researching the Python library, I understood a little about egg.info.
The story of making a module that skips mail with python
A story about trying to improve the testing process of a system written in C language for 20 years