Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
MATLAB to Python conversion
#11
That's what I'm finding - lots of ways to store the data. Each way I have tried has limitations in data indexing.

With the MATLAB code I can index the number of workers in all files at once like filedata[:].numWorkers. I can access the locations of all trucks in a given file like filedata[1].truck[:].location - I haven't come across a way to do that in Python without n-dimensional arrays, and my problem is that the number of trucks or workers will change from shift to shift, requiring different sized vectors in each tier of the structure/class/whatever I set up. It may just be that it isn't possible to do this in Python the way I need to. I guess I could just create a large arrays to ensure my data will fit, and just store the size of each set of variables for bookkeeping (or search for non-NaN values).
Reply


Messages In This Thread
MATLAB to Python conversion - by stokd - Jan-18-2020, 02:24 AM
RE: MATLAB to Python conversion - by stokd - Jan-18-2020, 03:34 AM
RE: MATLAB to Python conversion - by perfringo - Jan-18-2020, 06:37 AM
RE: MATLAB to Python conversion - by buran - Jan-18-2020, 07:05 AM
RE: MATLAB to Python conversion - by ibreeden - Jan-18-2020, 11:11 AM
RE: MATLAB to Python conversion - by stokd - Jan-18-2020, 06:14 PM
RE: MATLAB to Python conversion - by stokd - Jan-18-2020, 08:04 PM
RE: MATLAB to Python conversion - by buran - Jan-18-2020, 08:28 PM
RE: MATLAB to Python conversion - by stokd - Jan-18-2020, 08:32 PM
RE: MATLAB to Python conversion - by ibreeden - Jan-19-2020, 10:00 AM
RE: MATLAB to Python conversion - by stokd - Jan-19-2020, 09:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Media Pipe Python Interfacing with MATLAB cmcreecc 1 161 May-30-2024, 07:23 AM
Last Post: TrentErnser
  I need to add data types to cython conversion python to c Good_AI_User 1 1,087 Aug-19-2022, 07:52 AM
Last Post: Gribouillis
Photo Matlab to Python Sateesh 0 1,740 Nov-04-2020, 09:11 AM
Last Post: Sateesh
  From Matlab to Python erbab 1 2,084 Oct-27-2020, 02:16 PM
Last Post: jefsummers
  Arrays in MATLAB and PYTHON cokhuatlanyeuthuongconhetmuc 2 2,274 Jul-24-2020, 10:47 AM
Last Post: cokhuatlanyeuthuongconhetmuc
  Conversion of Oracle PL/SQL(packages, functions, procedures) to python modules. DivyaKumar 2 6,654 Jul-09-2020, 04:46 PM
Last Post: srikanth7482
  Matlab to Python -- Parallel Computing zistambo 1 2,045 Jun-10-2020, 04:59 PM
Last Post: pyzyx3qwerty
  C to Python code conversion print problem anakk1n 1 2,253 May-22-2020, 04:15 PM
Last Post: deanhystad
  Python uppercase conversion conditions Jaypeng 7 3,118 Apr-29-2020, 11:24 AM
Last Post: jefsummers
  Python v MatLab for graphs and plots CynthiaMoore 4 3,158 Apr-22-2020, 02:13 PM
Last Post: CynthiaMoore

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020