Skip to content Skip to sidebar Skip to footer

Assistance, Tips And Guidelines For Converting Matlab Code To Python

I am a heavy Matlab programmer and need to accomplish a task which Matlab can't do natively. For this purpose, I have chosen Python. I have completed the Codecademy Python course a

Solution 1:

My experience in matlab is limited, but here's my input based off of looking at your code

  1. I would define EqnsArray outside of the main function and add N as one of the arguments.
  2. I don't see how this would need to change if what you have works in matlab
  3. Based off of what I see I don't think you need to declare anything as global. Any variable encountered inside of a function that isn't defined within the function will be assumed to be a global variable in python.

Post a Comment for "Assistance, Tips And Guidelines For Converting Matlab Code To Python"