Import mat-files (v4, v5, v7.3) in Javascript like in Python

Hi,

i have a python script to plot some timeseries data. In a python plot i can use the zoom factor to aggregate data points to keep the plot performace.
I read the input data from MATLAb mat-files.

e.g. source code pyton:

import h5py
import scipy.io as sio

f = open(“PathToMatFile”, ‘rb’)
matVersion = sio.matlab.miobase.get_matfile_version(f)

if matVersion[0] == 1: # v5
matContents = sio.loadmat(“PathToMatFile”)
elif matVersion[0] == 2: # v7.3
matContents = h5py.File(“PathToMatFile”, ‘r’)

Now i can only low the needed data from the mat-files, not all!
Is there any possibility to do this in javascript (Generic JavaScript View)?

BR,
ptrwlr

Hi @ptrwlr,

any chance you can use this node:

https://hub.knime.com/knime/nodes/Python_Source*XZD1nWxILXiGMxGY

Cheers,

Christian

1 Like