我得到两个数据,我想把它作为.mat文件 所以我用了模块scipy.io公司以及scipy.io.savemat 但当我打开文件时: enter image description here
我想得到两列950x1而不是1x950
代码如下:
import scipy.io as sio
x = Ramanshift1[64:1014]
Hem_I_Nor = pd.Normalization(y3_arpls)
sio.savemat(Hem_path+'/matdata.mat',{'ramanshift':x,'ramanspectra':Hem_I_Nor})
x来自一列 而Hem muu iu Nor来自pandas,所有这些都可以保存到.csv和两个列中
在numpy会话中:
在八度音阶中,在
^{pr2}$load
之后:它是构成(1,n)矩阵的一维数组:
^{3}$对于2d数组,请观察
order
。MATLAB使用F
。所以另存为
由于数组/矩阵顺序的固有差异,将值从一个传递到另一个可能会令人困惑。
savemat/loadmat
操作不一定有帮助。在看看文档,还有一个
oned_as
参数,它控制(n,)
数组是保存为(n,1)还是(1,n)。在相关问题 更多 >
编程相关推荐