擅长:python、mysql、java
<p>我认为您需要创建这样的数据帧:</p>
<pre><code>df = DataFrame({'array1':array1, 'array2':array2,'array3':array3})
</code></pre>
<p>像这样保存:</p>
<pre><code>scipy.io.savemat('test_recarray_struct.mat', {'struct':df.to_dict("list")})
</code></pre>
<p>所以代码应该是这样的:</p>
<pre><code># ... import appropritely
array1 = np.array([1,2,3])
array2 = np.array(['a','b','c'])
array3 = np.array([1.01,2.02,3.03])
df = DataFrame({'array1':array1, 'array2':array2,'array3':array3})
scipy.io.savemat('test_recarray_struct.mat', {'struct':df.to_dict("list")})
</code></pre>