Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python save .mat

>>> from scipy.io import savemat
>>> a = np.arange(20)
>>> mdic = {"a": a, "label": "experiment"}
>>> mdic
{'a': array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
    17, 18, 19]),
'label': 'experiment'}
>>> savemat("matlab_matrix.mat", mdic)
Comment

PREVIOUS NEXT
Code Example
Python :: how to replace a row value in pyspark dataframe 
Python :: mongodb check if substring in string 
Python :: import python module from another directory 
Python :: python set current working directory to script location python 
Python :: how to do channel first in pytorch 
Python :: python how to set multiple conditional for single var 
Python :: flask clear session 
Python :: NameError: name ‘pd’ is not defined 
Python :: drop columns pyspark 
Python :: max of 2d array python 
Python :: pygame hide cursor 
Python :: reverse shell python 
Python :: rangoli in python 
Python :: decode base64 with python 
Python :: python rickroll code 
Python :: plt.figure resize 
Python :: how to delete a turtle in python 
Python :: python datetime subtract seconds 
Python :: chi square test in python 
Python :: pandas fill missing values with average 
Python :: get all count rows pandas 
Python :: minute range python 
Python :: change column value based on another column pandas 
Python :: Set column as index with pandas 
Python :: python list comprehension double for 
Python :: sort array python by column 
Python :: string to float python pandas 
Python :: multiply column of dataframe by number 
Python :: python3 return a list of indexes of a specific character in a string 
Python :: how to install python 3.6 ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
2+5 =